Package com.google.gerrit.server
Class PeerDaemonUser
- java.lang.Object
-
- com.google.gerrit.server.CurrentUser
-
- com.google.gerrit.server.PeerDaemonUser
-
public class PeerDaemonUser extends CurrentUser
Identity of a peer daemon process that isn't this JVM.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
PeerDaemonUser.Factory
-
Field Summary
Fields Modifier and Type Field Description static String
USER_NAME
Magic username used by peers when they authenticate.-
Fields inherited from class com.google.gerrit.server.CurrentUser
LAST_LOGIN_EXTERNAL_ID_PROPERTY_KEY
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
PeerDaemonUser(SocketAddress peer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
getCacheKey()
Returns a unique identifier for this user that is intended to be used as a cache key.GroupMembership
getEffectiveGroups()
Get the set of groups the user is currently a member of.SocketAddress
getRemoteAddress()
String
toString()
-
Methods inherited from class com.google.gerrit.server.CurrentUser
asIdentifiedUser, get, getAccessPath, getAccountId, getEmailAddresses, getExternalIdKeys, getLastLoginExternalIdKey, getLoggableName, getRealUser, getUserName, hasSameAccountId, isIdentifiedUser, isImpersonating, isInternalUser, setAccessPath, updateRealAccountId
-
-
-
-
Field Detail
-
USER_NAME
public static final String USER_NAME
Magic username used by peers when they authenticate.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
PeerDaemonUser
@Inject protected PeerDaemonUser(SocketAddress peer)
-
-
Method Detail
-
getEffectiveGroups
public GroupMembership getEffectiveGroups()
Description copied from class:CurrentUser
Get the set of groups the user is currently a member of.The returned set may be a subset of the user's actual groups; if the user's account is currently deemed to be untrusted then the effective group set is only the anonymous and registered user groups. To enable additional groups (and gain their granted permissions) the user must update their account to use only trusted authentication providers.
- Specified by:
getEffectiveGroups
in classCurrentUser
- Returns:
- active groups for this user.
-
getCacheKey
public Object getCacheKey()
Description copied from class:CurrentUser
Returns a unique identifier for this user that is intended to be used as a cache key. Returned object should to implementequals()
andhashCode()
for effective caching.- Specified by:
getCacheKey
in classCurrentUser
-
getRemoteAddress
public SocketAddress getRemoteAddress()
-
-