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

pull/13561/head^2
Lunny Xiao 4 years ago committed by GitHub
parent ed3a4cd103
commit bcde51f4c2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      routers/private/serv.go
  2. 2
      routers/repo/http.go

@ -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",

@ -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
}

Loading…
Cancel
Save