Package com.google.gerrit.server.account
Class AccountControl
- java.lang.Object
-
- com.google.gerrit.server.account.AccountControl
-
public class AccountControl extends Object
Access control management for one account's access to other accounts.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
AccountControl.Factory
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canSee(Account.Id otherUser)
Returns true if the current user is allowed to see the otherUser, based on the account visibility policy.boolean
canSee(AccountState otherUser)
Returns true if the current user is allowed to see the otherUser, based on the account visibility policy.CurrentUser
getUser()
-
-
-
Method Detail
-
getUser
public CurrentUser getUser()
-
canSee
public boolean canSee(Account.Id otherUser)
Returns true if the current user is allowed to see the otherUser, based on the account visibility policy. Depending on the group membership realms supported, this may not be able to determine SAME_GROUP or VISIBLE_GROUP correctly (defaulting to not being visible). This is becauseGroupMembership.getKnownGroups()
may only return a subset of the effective groups.
-
canSee
public boolean canSee(AccountState otherUser)
Returns true if the current user is allowed to see the otherUser, based on the account visibility policy. Depending on the group membership realms supported, this may not be able to determine SAME_GROUP or VISIBLE_GROUP correctly (defaulting to not being visible). This is becauseGroupMembership.getKnownGroups()
may only return a subset of the effective groups.
-
-