diff options
author | guillep2k <18600385+guillep2k@users.noreply.github.com> | 2019-08-24 09:28:59 -0300 |
---|---|---|
committer | Lauris BH <lauris@nix.lv> | 2019-08-24 15:28:59 +0300 |
commit | e3115cc019211fa2549f6943d379bf58fe7b7d7d (patch) | |
tree | 050115e3cdf4e0334d081459312f711e55f4ea86 /models/org.go | |
parent | f83db078f0603c775cd1b1bb016f996b65a04835 (diff) | |
download | gitea-e3115cc019211fa2549f6943d379bf58fe7b7d7d.tar.gz gitea-e3115cc019211fa2549f6943d379bf58fe7b7d7d.zip |
Add support for DEFAULT_ORG_MEMBER_VISIBLE (#7669)
* Add support for DEFAULT_ORG_MEMBER_VISIBLE
* Correct formatting
* Improved description in cheat sheet.
* Add test for DefaultOrgMemberVisible
* Remove dead code
Diffstat (limited to 'models/org.go')
-rw-r--r-- | models/org.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/models/org.go b/models/org.go index 909657cffd..e00bef5798 100644 --- a/models/org.go +++ b/models/org.go @@ -12,6 +12,7 @@ import ( "strings" "code.gitea.io/gitea/modules/log" + "code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/modules/structs" "github.com/go-xorm/xorm" @@ -480,8 +481,9 @@ func AddOrgUser(orgID, uid int64) error { } ou := &OrgUser{ - UID: uid, - OrgID: orgID, + UID: uid, + OrgID: orgID, + IsPublic: setting.Service.DefaultOrgMemberVisible, } if _, err := sess.Insert(ou); err != nil { |