Package com.google.gerrit.server
Class InternalUser
java.lang.Object
com.google.gerrit.server.CurrentUser
com.google.gerrit.server.InternalUser
- Direct Known Subclasses:
PluginUser
User identity for plugin code that needs an identity.
An InternalUser has no real identity, it acts as the server and can access anything it wants, anytime it wants, given the JVM's own direct access to data. Plugins may use this when they need to have a CurrentUser with read permission on anything.
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from class com.google.gerrit.server.CurrentUser
LAST_LOGIN_EXTERNAL_ID_PROPERTY_KEY
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns a unique identifier for this user that is intended to be used as a cache key.Get the set of groups the user is currently a member of.boolean
Check if the CurrentUser is an InternalUser.toString()
Methods inherited from class com.google.gerrit.server.CurrentUser
asIdentifiedUser, get, getAccessPath, getAccountId, getEmailAddresses, getExternalIdKeys, getLastLoginExternalIdKey, getLoggableName, getRealUser, getUserName, hasSameAccountId, isIdentifiedUser, isImpersonating, setAccessPath, updateRealAccountId
-
Constructor Details
-
InternalUser
public InternalUser()
-
-
Method Details
-
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
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
-
isInternalUser
public boolean isInternalUser()Description copied from class:CurrentUser
Check if the CurrentUser is an InternalUser.- Overrides:
isInternalUser
in classCurrentUser
-
toString
-