diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2018-12-12 03:33:24 +0800 |
---|---|---|
committer | techknowlogick <hello@techknowlogick.com> | 2018-12-11 14:33:24 -0500 |
commit | 58c4559d3ba4a6b10e9bad3f84d53cc08edf7662 (patch) | |
tree | c096939125c35640a4f5e0184fafc772e18391a1 | |
parent | ba75319157f23031cfca55b5a286f86d36065f35 (diff) | |
download | gitea-58c4559d3ba4a6b10e9bad3f84d53cc08edf7662.tar.gz gitea-58c4559d3ba4a6b10e9bad3f84d53cc08edf7662.zip |
fix permission check on api create org (#5523)
-rw-r--r-- | routers/api/v1/org/org.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/routers/api/v1/org/org.go b/routers/api/v1/org/org.go index c300c28141..6b7d38e3f4 100644 --- a/routers/api/v1/org/org.go +++ b/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 } |