Class GlobalCapability
Permission
objects.
Contrary to Permission
, global capabilities do not need a resource to check
permissions on.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
Ability to view code review metadata refs in repositories.static final String
Denotes the server's administrators.static final String
Maximum number of changes that may be pushed in a batch.static final String
Can create any account on the server.static final String
Can create any group on the server.static final String
Can create any project on the server.static final int
Default maximum number of changes that may be pushed in a batch, 0 means no limit.static final int
Default result limit per executed query.static final String
Denotes who may email change reviewers and watchers.static final String
Can flush any cache except the active web_sessions cache.static final String
Can terminate any task using the kill command.static final String
Can perform limited server maintenance.static final String
Can modify any account on the server.static final String
Queue a user can access to submit their tasks to.static final String
Maximum result limit per executed query.static final String
Can impersonate any user to see which refs they can read.static final String
Ability to impersonate another user.static final String
Can run the Git garbage collection.static final String
Can perform streaming of Gerrit events.static final String
Can query permissions for any (project, user) pairstatic final String
Can view all accounts, regardless ofaccounts.visibility
.static final String
Can view the server's current cache states.static final String
Can view open connections to the server's SSH port.static final String
Can view all installed plugins.static final String
Can view all pending tasks in the queue (not just the filtered set).static final String
Can view secondary emails of other accounts. -
Method Summary
Modifier and TypeMethodDescriptionstatic com.google.common.collect.ImmutableList<String>
Returns all valid capability names.static PermissionRange.WithDefaults
Returns the valid range for the capability if it has one, otherwise null.static boolean
Returns true if the capability should have a range attached.static boolean
isGlobalCapability
(String varName) Returns true if the name is recognized as a capability name.
-
Field Details
-
ACCESS_DATABASE
Ability to view code review metadata refs in repositories.- See Also:
-
ADMINISTRATE_SERVER
Denotes the server's administrators.This is similar to UNIX root, or Windows SYSTEM account. Any user that has this capability can perform almost any other action, or can grant themselves the power to perform any other action on the site. Most of the other capabilities and permissions fall-back to the predicate "OR user has capability ADMINISTRATE_SERVER".
- See Also:
-
BATCH_CHANGES_LIMIT
Maximum number of changes that may be pushed in a batch.- See Also:
-
DEFAULT_MAX_BATCH_CHANGES_LIMIT
public static final int DEFAULT_MAX_BATCH_CHANGES_LIMITDefault maximum number of changes that may be pushed in a batch, 0 means no limit. This is just used as a suggestion for prepopulating the field in the access UI.- See Also:
-
CREATE_ACCOUNT
Can create any account on the server.- See Also:
-
CREATE_GROUP
Can create any group on the server.- See Also:
-
CREATE_PROJECT
Can create any project on the server.- See Also:
-
EMAIL_REVIEWERS
Denotes who may email change reviewers and watchers.This can be used to deny build bots from emailing reviewers and people who watch the change. Instead, only the authors of the change and those who starred it will be emailed. The allow rules are evaluated before deny rules, however the default is to allow emailing, if no explicit rule is matched.
- See Also:
-
FLUSH_CACHES
Can flush any cache except the active web_sessions cache.- See Also:
-
KILL_TASK
Can terminate any task using the kill command.- See Also:
-
MAINTAIN_SERVER
Can perform limited server maintenance.Includes tasks such as reindexing changes and flushing caches that may need to be performed regularly. Does not grant arbitrary read/write/ACL management permissions as does
ADMINISTRATE_SERVER
.- See Also:
-
MODIFY_ACCOUNT
Can modify any account on the server.- See Also:
-
PRIORITY
Queue a user can access to submit their tasks to.- See Also:
-
QUERY_LIMIT
Maximum result limit per executed query.- See Also:
-
DEFAULT_MAX_QUERY_LIMIT
public static final int DEFAULT_MAX_QUERY_LIMITDefault result limit per executed query.- See Also:
-
READ_AS
Can impersonate any user to see which refs they can read.- See Also:
-
RUN_AS
Ability to impersonate another user.- See Also:
-
RUN_GC
Can run the Git garbage collection.- See Also:
-
STREAM_EVENTS
Can perform streaming of Gerrit events.- See Also:
-
VIEW_ACCESS
Can query permissions for any (project, user) pair- See Also:
-
VIEW_ALL_ACCOUNTS
Can view all accounts, regardless ofaccounts.visibility
.- See Also:
-
VIEW_CACHES
Can view the server's current cache states.- See Also:
-
VIEW_CONNECTIONS
Can view open connections to the server's SSH port.- See Also:
-
VIEW_PLUGINS
Can view all installed plugins.- See Also:
-
VIEW_QUEUE
Can view all pending tasks in the queue (not just the filtered set).- See Also:
-
VIEW_SECONDARY_EMAILS
Can view secondary emails of other accounts.- See Also:
-
-
Method Details
-
getAllNames
Returns all valid capability names. -
isGlobalCapability
Returns true if the name is recognized as a capability name. -
hasRange
Returns true if the capability should have a range attached. -
getRangeNames
-
getRange
Returns the valid range for the capability if it has one, otherwise null.
-