public enum RefPermission extends java.lang.Enum<RefPermission> implements GerritPermission
Enum Constant and Description |
---|
CREATE |
CREATE_CHANGE
Create a change to code review a commit.
|
CREATE_SIGNED_TAG
Create a signed tag.
|
CREATE_TAG
Create a tag.
|
DELETE
Before checking this permission, the caller needs to verify the branch is deletable and reject
early if the branch should never be deleted.
|
FORCE_UPDATE |
FORGE_AUTHOR |
FORGE_COMMITTER |
FORGE_SERVER |
MERGE |
READ |
READ_CONFIG
Read access to ref's config section in
project.config . |
READ_PRIVATE_CHANGES
Can read all private changes on the ref.
|
SET_HEAD |
SKIP_VALIDATION
Before checking this permission, the caller should verify
USE_SIGNED_OFF_BY is false. |
UPDATE |
UPDATE_BY_SUBMIT
Creates changes, then also immediately submits them during
push . |
WRITE_CONFIG
Write access to ref's config section in
project.config . |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
describeForException()
A description in the context of an exception message.
|
static RefPermission |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static RefPermission[] |
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 RefPermission READ
public static final RefPermission CREATE
public static final RefPermission DELETE
public static final RefPermission UPDATE
public static final RefPermission FORCE_UPDATE
public static final RefPermission SET_HEAD
public static final RefPermission FORGE_AUTHOR
public static final RefPermission FORGE_COMMITTER
public static final RefPermission FORGE_SERVER
public static final RefPermission MERGE
public static final RefPermission SKIP_VALIDATION
USE_SIGNED_OFF_BY
is false.
If it's true, the request should be rejected directly without further check this permission.public static final RefPermission CREATE_CHANGE
public static final RefPermission CREATE_TAG
public static final RefPermission CREATE_SIGNED_TAG
public static final RefPermission UPDATE_BY_SUBMIT
push
.
This is similar to UPDATE
except it constructs changes first, then submits them
according to the submit strategy, which may include cherry-pick or rebase. By creating changes
for each commit, automatic server side rebase, and post-update review are enabled.
public static final RefPermission READ_PRIVATE_CHANGES
public static final RefPermission READ_CONFIG
project.config
.public static final RefPermission WRITE_CONFIG
project.config
.public static RefPermission[] values()
for (RefPermission c : RefPermission.values()) System.out.println(c);
public static RefPermission 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