public class IdentifiedUser extends CurrentUser
Modifier and Type | Class and Description |
---|---|
static class |
IdentifiedUser.GenericFactory
Create an IdentifiedUser, ignoring any per-request state.
|
static class |
IdentifiedUser.RequestFactory
Create an IdentifiedUser, relying on current request state.
|
Modifier and Type | Method and Description |
---|---|
void |
abortStarredChanges() |
void |
asyncStarredChanges() |
com.google.gerrit.reviewdb.client.Account |
getAccount() |
com.google.gerrit.reviewdb.client.AccountDiffPreference |
getAccountDiffPreference() |
com.google.gerrit.reviewdb.client.Account.Id |
getAccountId()
The account identity for the user.
|
GroupMembership |
getEffectiveGroups()
Get the set of groups the user is currently a member of.
|
Set<String> |
getEmailAddresses() |
String |
getName() |
String |
getNameEmail() |
Collection<com.google.gerrit.reviewdb.client.AccountProjectWatch> |
getNotificationFilters()
Filters selecting changes the user wants to monitor.
|
CurrentUser |
getRealUser()
Identity of the authenticated user.
|
Set<com.google.gerrit.reviewdb.client.Change.Id> |
getStarredChanges()
Set of changes starred by this user.
|
String |
getUserName()
Unique name of the user on this server, if one has been assigned.
|
boolean |
isIdentifiedUser()
Check if user is the IdentifiedUser
|
org.eclipse.jgit.lib.PersonIdent |
newCommitterIdent(Date when,
TimeZone tz) |
org.eclipse.jgit.lib.PersonIdent |
newRefLogIdent() |
org.eclipse.jgit.lib.PersonIdent |
newRefLogIdent(Date when,
TimeZone tz) |
AccountState |
state() |
String |
toString() |
getAccessPath, getCapabilities, setAccessPath
public CurrentUser getRealUser()
CurrentUser
In the normal case where a user authenticates as themselves
getRealUser() == this
.
If X-Gerrit-RunAs
or suexec
was used this method returns
the identity of the account that has permission to act on behalf of this
user.
getRealUser
in class CurrentUser
public AccountState state()
public com.google.gerrit.reviewdb.client.Account.Id getAccountId()
public String getUserName()
CurrentUser
getUserName
in class CurrentUser
public com.google.gerrit.reviewdb.client.Account getAccount()
public com.google.gerrit.reviewdb.client.AccountDiffPreference getAccountDiffPreference()
public String getName()
public String getNameEmail()
public GroupMembership getEffectiveGroups()
CurrentUser
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.
getEffectiveGroups
in class CurrentUser
public Set<com.google.gerrit.reviewdb.client.Change.Id> getStarredChanges()
CurrentUser
getStarredChanges
in class CurrentUser
public void asyncStarredChanges()
public void abortStarredChanges()
public Collection<com.google.gerrit.reviewdb.client.AccountProjectWatch> getNotificationFilters()
CurrentUser
getNotificationFilters
in class CurrentUser
public org.eclipse.jgit.lib.PersonIdent newRefLogIdent()
public boolean isIdentifiedUser()
isIdentifiedUser
in class CurrentUser