Skip to content

Commit 6edd6d5

Browse files
authored
Fix a bug when check if owner is active (#13614)
1 parent f845fa0 commit 6edd6d5

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
@@ -104,7 +104,7 @@ func HTTP(ctx *context.Context) {
104104
ctx.NotFoundOrServerError("GetUserByName", models.IsErrUserNotExist, err)
105105
return
106106
}
107-
if !owner.IsActive {
107+
if !owner.IsOrganization() && !owner.IsActive {
108108
ctx.HandleText(http.StatusForbidden, "Repository cannot be accessed. You cannot push or open issues/pull-requests.")
109109
return
110110
}

0 commit comments

Comments
 (0)