mirror of
https://github.com/go-gitea/gitea.git
synced 2026-09-08 22:13:26 +09:00
fix(org): hide limited organizations from restricted users (#39047)
Do not expose limited organization memberships to restricted viewers. --------- Co-authored-by: silverwind <me@silverwind.io>
This commit is contained in:
@@ -89,6 +89,9 @@ func DoerViewOtherVisibility(doer, other *user_model.User) structs.VisibleType {
|
||||
if doer.IsAdmin || doer.ID == other.ID {
|
||||
return structs.VisibleTypePrivate
|
||||
}
|
||||
if doer.IsRestricted {
|
||||
return structs.VisibleTypePublic
|
||||
}
|
||||
return structs.VisibleTypeLimited
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user