Parcourir la source

fix permission check on api create org (#5523)

tags/v1.7.0-dev
Lunny Xiao il y a 5 ans
Parent
révision
58c4559d3b
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1
    1
      routers/api/v1/org/org.go

+ 1
- 1
routers/api/v1/org/org.go Voir le fichier

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

Chargement…
Annuler
Enregistrer