Skip to content

Commit 5a991ec

Browse files
authored
Fix a bug when check if owner is active (#13612)
1 parent 76cdf3b commit 5a991ec

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

routers/private/serv.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ func ServCommand(ctx *macaron.Context) {
114114
})
115115
return
116116
}
117-
if !owner.IsActive {
117+
if !owner.IsOrganization() && !owner.IsActive {
118118
ctx.JSON(http.StatusForbidden, map[string]interface{}{
119119
"results": results,
120120
"type": "ForbiddenError",

routers/repo/http.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ func HTTP(ctx *context.Context) {
105105
ctx.NotFoundOrServerError("GetUserByName", models.IsErrUserNotExist, err)
106106
return
107107
}
108-
if !owner.IsActive {
108+
if !owner.IsOrganization() && !owner.IsActive {
109109
ctx.HandleText(http.StatusForbidden, "Repository cannot be accessed. You cannot push or open issues/pull-requests.")
110110
return
111111
}

0 commit comments

Comments
 (0)