1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-12-21 12:44:49 -05:00

Fix a bug when check if owner is active (#13612)

This commit is contained in:
Lunny Xiao 2020-11-18 17:58:25 +08:00 committed by GitHub
parent 76cdf3b7af
commit 5a991ec519
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -114,7 +114,7 @@ func ServCommand(ctx *macaron.Context) {
})
return
}
if !owner.IsActive {
if !owner.IsOrganization() && !owner.IsActive {
ctx.JSON(http.StatusForbidden, map[string]interface{}{
"results": results,
"type": "ForbiddenError",

View file

@ -105,7 +105,7 @@ func HTTP(ctx *context.Context) {
ctx.NotFoundOrServerError("GetUserByName", models.IsErrUserNotExist, err)
return
}
if !owner.IsActive {
if !owner.IsOrganization() && !owner.IsActive {
ctx.HandleText(http.StatusForbidden, "Repository cannot be accessed. You cannot push or open issues/pull-requests.")
return
}