From e1e08ef75320ee75ef568ad1be8b70ff2c80c107 Mon Sep 17 00:00:00 2001 From: DrMaxNix Date: Sat, 23 Mar 2024 00:23:10 +0100 Subject: [PATCH] Respect DEFAULT_ORG_MEMBER_VISIBLE setting when adding creator to org --- models/organization/org.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/models/organization/org.go b/models/organization/org.go index a3082e9ac7458..ba0fd756e38f6 100644 --- a/models/organization/org.go +++ b/models/organization/org.go @@ -319,8 +319,9 @@ func CreateOrganization(ctx context.Context, org *Organization, owner *user_mode // Add initial creator to organization and owner team. if err = db.Insert(ctx, &OrgUser{ - UID: owner.ID, - OrgID: org.ID, + UID: owner.ID, + OrgID: org.ID, + IsPublic: setting.Service.DefaultOrgMemberVisible, }); err != nil { return fmt.Errorf("insert org-user relation: %w", err) }