Skip to content

Commit

Permalink
Fix a bug when check if owner is active (#13612)
Browse files Browse the repository at this point in the history
  • Loading branch information
lunny authored Nov 18, 2020
1 parent 76cdf3b commit 5a991ec
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion routers/private/serv.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion routers/repo/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 5a991ec

Please sign in to comment.