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:
bircni
2026-08-22 23:11:04 -07:00
committed by GitHub
co-authored by silverwind
parent d8f0e7e679
commit bedd2afb47
3 changed files with 15 additions and 3 deletions
+3
View File
@@ -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
}