Enum Class ProjectPermission
- All Implemented Interfaces:
CoreOrPluginProjectPermission
,GerritPermission
,Serializable
,Comparable<ProjectPermission>
,java.lang.constant.Constable
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionCan access at least one reference or change within the repository.Allow banning commits from Gerrit preventing pushes of these commits.Can create at least one change in the project.Can create at least one reference in the project.Can create at least one tag reference in the project.Can push to at least one reference within the repository.Can read all references in the repository.Allow read access to refs/meta/config.Allow accessing the project's reflog.Can run receive pack.Can run upload pack.Allow write access to refs/meta/config. -
Method Summary
Modifier and TypeMethodDescriptionA description in the context of an exception message.static ProjectPermission
Returns the enum constant of this class with the specified name.static ProjectPermission[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
ACCESS
Can access at least one reference or change within the repository.Checking this permission instead of
READ
may require filtering to hide specific references or changes, which can be expensive. -
READ
Can read all references in the repository.This is a stronger form of
ACCESS
where no filtering is required. -
CREATE_REF
Can create at least one reference in the project.This project level permission only validates the user may create some type of reference within the project. The exact reference name must be checked at creation:
permissionBackend .user(user) .project(proj) .ref(ref) .check(RefPermission.CREATE);
-
CREATE_TAG_REF
Can create at least one tag reference in the project.This project level permission only validates the user may create some tag reference within the project. The exact reference name must be checked at creation:
permissionBackend .user(user) .project(proj) .ref(ref) .check(RefPermission.CREATE);
-
CREATE_CHANGE
Can create at least one change in the project.This project level permission only validates the user may create a change for some branch within the project. The exact reference name must be checked at creation:
permissionBackend .user(user) .project(proj) .ref(ref) .check(RefPermission.CREATE_CHANGE);
-
RUN_RECEIVE_PACK
Can run receive pack. -
RUN_UPLOAD_PACK
Can run upload pack. -
READ_CONFIG
Allow read access to refs/meta/config. -
WRITE_CONFIG
Allow write access to refs/meta/config. -
BAN_COMMIT
Allow banning commits from Gerrit preventing pushes of these commits. -
READ_REFLOG
Allow accessing the project's reflog. -
PUSH_AT_LEAST_ONE_REF
Can push to at least one reference within the repository.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
describeForException
Description copied from interface:GerritPermission
A description in the context of an exception message.Should be grammatical when used in the construction "not permitted: [description] on [resource]", although individual
PermissionBackend
implementations may vary the wording.- Specified by:
describeForException
in interfaceGerritPermission
-