Skip to content

Commit 58c4559

Browse files
lunnytechknowlogick
authored andcommitted
fix permission check on api create org (#5523)
1 parent ba75319 commit 58c4559

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

routers/api/v1/org/org.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ func Create(ctx *context.APIContext, form api.CreateOrgOption) {
8585
// "422":
8686
// "$ref": "#/responses/validationError"
8787

88-
if !ctx.User.AllowCreateOrganization {
88+
if !ctx.User.CanCreateOrganization() {
8989
ctx.Error(403, "Create organization not allowed", nil)
9090
return
9191
}

0 commit comments

Comments
 (0)