Skip to content

Commit e3e08dc

Browse files
authored
Respect DEFAULT_ORG_MEMBER_VISIBLE setting when adding creator to org (#30013)
This PR adds `setting.Service.DefaultOrgMemberVisible` value to dataset of user when the initial org creator is being added to the created org. Fixes #30012.
1 parent 900dd79 commit e3e08dc

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

models/organization/org.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -319,8 +319,9 @@ func CreateOrganization(ctx context.Context, org *Organization, owner *user_mode
319319

320320
// Add initial creator to organization and owner team.
321321
if err = db.Insert(ctx, &OrgUser{
322-
UID: owner.ID,
323-
OrgID: org.ID,
322+
UID: owner.ID,
323+
OrgID: org.ID,
324+
IsPublic: setting.Service.DefaultOrgMemberVisible,
324325
}); err != nil {
325326
return fmt.Errorf("insert org-user relation: %w", err)
326327
}

0 commit comments

Comments
 (0)