Browse Source

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

tags/v1.15.0-dev
Lunny Xiao GitHub 4 years ago
parent
commit
1afec67a57
2 changed files with 2 additions and 2 deletions
  1. +1
    -1
      routers/private/serv.go
  2. +1
    -1
      routers/repo/http.go

+ 1
- 1
routers/private/serv.go View File

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


+ 1
- 1
routers/repo/http.go View File

@@ -105,7 +105,7 @@ func HTTP(ctx *context.Context) {
ctx.NotFoundOrServerError("GetUserByName", models.IsErrUserNotExist, err) ctx.NotFoundOrServerError("GetUserByName", models.IsErrUserNotExist, err)
return 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.") ctx.HandleText(http.StatusForbidden, "Repository cannot be accessed. You cannot push or open issues/pull-requests.")
return return
} }


Loading…
Cancel
Save