diff --git a/modules/auth/org.go b/modules/auth/org.go index 2abffdf74..94e659cb5 100644 --- a/modules/auth/org.go +++ b/modules/auth/org.go @@ -22,8 +22,9 @@ import ( // CreateOrgForm form for creating organization type CreateOrgForm struct { - OrgName string `binding:"Required;AlphaDashDot;MaxSize(40)" locale:"org.org_name_holder"` - Visibility structs.VisibleType + OrgName string `binding:"Required;AlphaDashDot;MaxSize(40)" locale:"org.org_name_holder"` + Visibility structs.VisibleType + RepoAdminChangeTeamAccess bool } // Validate validates the fields diff --git a/routers/org/org.go b/routers/org/org.go index 3821b3221..85bc25217 100644 --- a/routers/org/org.go +++ b/routers/org/org.go @@ -47,10 +47,11 @@ func CreatePost(ctx *context.Context, form auth.CreateOrgForm) { } org := &models.User{ - Name: form.OrgName, - IsActive: true, - Type: models.UserTypeOrganization, - Visibility: form.Visibility, + Name: form.OrgName, + IsActive: true, + Type: models.UserTypeOrganization, + Visibility: form.Visibility, + RepoAdminChangeTeamAccess: form.RepoAdminChangeTeamAccess, } if err := models.CreateOrganization(org, ctx.User); err != nil { diff --git a/templates/org/create.tmpl b/templates/org/create.tmpl index 8ae0fc22a..82c8766a9 100644 --- a/templates/org/create.tmpl +++ b/templates/org/create.tmpl @@ -33,9 +33,9 @@ -
+
-
+