mirror of
https://github.com/go-gitea/gitea
synced 2024-12-30 19:46:01 +01:00
Fix a bug when check if owner is active (#13612)
This commit is contained in:
parent
76cdf3b7af
commit
5a991ec519
@ -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…
Reference in New Issue
Block a user