public enum ProjectPermission extends java.lang.Enum<ProjectPermission> implements CoreOrPluginProjectPermission
Enum Constant and Description |
---|
ACCESS
Can access at least one reference or change within the repository.
|
BAN_COMMIT
Allow banning commits from Gerrit preventing pushes of these commits.
|
CREATE_CHANGE
Can create at least one change in the project.
|
CREATE_REF
Can create at least one reference in the project.
|
CREATE_TAG_REF
Can create at least one tag reference in the project.
|
PUSH_AT_LEAST_ONE_REF
Can push to at least one reference within the repository.
|
READ
Can read all references in the repository.
|
READ_CONFIG
Allow read access to refs/meta/config.
|
READ_REFLOG
Allow accessing the project's reflog.
|
RUN_RECEIVE_PACK
Can run receive pack.
|
RUN_UPLOAD_PACK
Can run upload pack.
|
WRITE_CONFIG
Allow write access to refs/meta/config.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
describeForException()
A description in the context of an exception message.
|
static ProjectPermission |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static ProjectPermission[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
describeEnumValue
public static final ProjectPermission ACCESS
Checking this permission instead of READ
may require filtering to hide specific
references or changes, which can be expensive.
public static final ProjectPermission READ
This is a stronger form of ACCESS
where no filtering is required.
public static final ProjectPermission CREATE_REF
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);
public static final ProjectPermission CREATE_TAG_REF
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);
public static final ProjectPermission CREATE_CHANGE
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);
public static final ProjectPermission RUN_RECEIVE_PACK
public static final ProjectPermission RUN_UPLOAD_PACK
public static final ProjectPermission READ_CONFIG
public static final ProjectPermission WRITE_CONFIG
public static final ProjectPermission BAN_COMMIT
public static final ProjectPermission READ_REFLOG
public static final ProjectPermission PUSH_AT_LEAST_ONE_REF
public static ProjectPermission[] values()
for (ProjectPermission c : ProjectPermission.values()) System.out.println(c);
public static ProjectPermission valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic java.lang.String describeForException()
GerritPermission
Should be grammatical when used in the construction "not permitted: [description] on
[resource]", although individual PermissionBackend
implementations may vary the
wording.
describeForException
in interface GerritPermission