Browse Source

fix permission check on api create org (#5523)

tags/v1.7.0-dev
Lunny Xiao 6 years ago committed by techknowlogick
parent
commit
58c4559d3b
  1. 2
      routers/api/v1/org/org.go

2
routers/api/v1/org/org.go

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

Loading…
Cancel
Save