Skip to content

Commit 366806d

Browse files
davidsvantessonzeripath
authored andcommitted
Fix errors in create org UI regarding team access permission. (#8506)
1 parent 54c137b commit 366806d

File tree

3 files changed

+10
-8
lines changed

3 files changed

+10
-8
lines changed

modules/auth/org.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,9 @@ import (
2222

2323
// CreateOrgForm form for creating organization
2424
type CreateOrgForm struct {
25-
OrgName string `binding:"Required;AlphaDashDot;MaxSize(40)" locale:"org.org_name_holder"`
26-
Visibility structs.VisibleType
25+
OrgName string `binding:"Required;AlphaDashDot;MaxSize(40)" locale:"org.org_name_holder"`
26+
Visibility structs.VisibleType
27+
RepoAdminChangeTeamAccess bool
2728
}
2829

2930
// Validate validates the fields

routers/org/org.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,11 @@ func CreatePost(ctx *context.Context, form auth.CreateOrgForm) {
4747
}
4848

4949
org := &models.User{
50-
Name: form.OrgName,
51-
IsActive: true,
52-
Type: models.UserTypeOrganization,
53-
Visibility: form.Visibility,
50+
Name: form.OrgName,
51+
IsActive: true,
52+
Type: models.UserTypeOrganization,
53+
Visibility: form.Visibility,
54+
RepoAdminChangeTeamAccess: form.RepoAdminChangeTeamAccess,
5455
}
5556

5657
if err := models.CreateOrganization(org, ctx.User); err != nil {

templates/org/create.tmpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@
3333
</div>
3434
</div>
3535

36-
<div class="field" id="permission_box">
36+
<div class="inline field" id="permission_box">
3737
<label>{{.i18n.Tr "org.settings.permission"}}</label>
38-
<div class="field">
38+
<div class="inline-grouped-list">
3939
<div class="ui checkbox">
4040
<input class="hidden" type="checkbox" name="repo_admin_change_team_access" checked/>
4141
<label>{{.i18n.Tr "org.settings.repoadminchangeteam"}}</label>

0 commit comments

Comments
 (0)