1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-11-22 08:42:32 -05:00

fix permission check on api create org (#5523)

This commit is contained in:
Lunny Xiao 2018-12-12 03:33:24 +08:00 committed by techknowlogick
parent ba75319157
commit 58c4559d3b

View file

@ -85,7 +85,7 @@ func Create(ctx *context.APIContext, form api.CreateOrgOption) {
// "422":
// "$ref": "#/responses/validationError"
if !ctx.User.AllowCreateOrganization {
if !ctx.User.CanCreateOrganization() {
ctx.Error(403, "Create organization not allowed", nil)
return
}