diff options
Diffstat (limited to 'models/organization')
-rw-r--r-- | models/organization/org.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/models/organization/org.go b/models/organization/org.go index 53b020d704..30b76fb1a0 100644 --- a/models/organization/org.go +++ b/models/organization/org.go @@ -342,11 +342,15 @@ func CreateOrganization(org *Organization, owner *user_model.User) (err error) { // insert units for team units := make([]TeamUnit, 0, len(unit.AllRepoUnitTypes)) for _, tp := range unit.AllRepoUnitTypes { + up := perm.AccessModeOwner + if tp == unit.TypeExternalTracker || tp == unit.TypeExternalWiki { + up = perm.AccessModeRead + } units = append(units, TeamUnit{ OrgID: org.ID, TeamID: t.ID, Type: tp, - AccessMode: perm.AccessModeOwner, + AccessMode: up, }) } |