Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DEFAULT_ORG_MEMBER_VISIBLE ignored for first org member #30012

Closed
DrMaxNix opened this issue Mar 22, 2024 · 0 comments · Fixed by #30013
Closed

DEFAULT_ORG_MEMBER_VISIBLE ignored for first org member #30012

DrMaxNix opened this issue Mar 22, 2024 · 0 comments · Fixed by #30013
Labels
Milestone

Comments

@DrMaxNix
Copy link
Contributor

DrMaxNix commented Mar 22, 2024

Description

The first org member (the creator) is being added when the org is created CreateOrganization():

if err = db.Insert(ctx, &OrgUser{
UID: owner.ID,
OrgID: org.ID,
}); err != nil {

Any new member is being added using another method AddOrgUser():

ou := &OrgUser{
UID: uid,
OrgID: orgID,
IsPublic: setting.Service.DefaultOrgMemberVisible,
}

Note that the default dataset of these differ. Namely, the dataset of the first member does not respect the default value for visibility.

Gitea Version

main

@lunny lunny added this to the 1.21.10 milestone Mar 23, 2024
silverwind pushed a commit that referenced this issue Mar 23, 2024
…#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.
GiteaBot pushed a commit to GiteaBot/gitea that referenced this issue Mar 23, 2024
…go-gitea#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 go-gitea#30012.
silverwind pushed a commit to silverwind/gitea that referenced this issue Mar 24, 2024
…go-gitea#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 go-gitea#30012.
6543 pushed a commit that referenced this issue Mar 24, 2024
…#30013) (#30035)

Backport #30013 by @DrMaxNix

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.

Co-authored-by: DrMaxNix <mail@drmaxnix.de>
@go-gitea go-gitea locked as resolved and limited conversation to collaborators Jun 22, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants