Enum Class RefPermission

java.lang.Object
java.lang.Enum<RefPermission>
com.google.gerrit.server.permissions.RefPermission
All Implemented Interfaces:
GerritPermission, Serializable, Comparable<RefPermission>, java.lang.constant.Constable

public enum RefPermission extends Enum<RefPermission> implements GerritPermission
  • Enum Constant Details

    • READ

      public static final RefPermission READ
    • CREATE

      public static final RefPermission CREATE
    • DELETE

      public static final RefPermission DELETE
      Before checking this permission, the caller needs to verify the branch is deletable and reject early if the branch should never be deleted. For example, the refs/meta/config branch should never be deleted because deleting this branch would destroy all Gerrit specific metadata about the project, including its access rules. If a project is to be removed from Gerrit, its repository should be removed first.
    • UPDATE

      public static final RefPermission UPDATE
    • FORCE_UPDATE

      public static final RefPermission FORCE_UPDATE
    • SET_HEAD

      public static final RefPermission SET_HEAD
    • FORGE_AUTHOR

      public static final RefPermission FORGE_AUTHOR
    • FORGE_COMMITTER

      public static final RefPermission FORGE_COMMITTER
    • FORGE_SERVER

      public static final RefPermission FORGE_SERVER
    • MERGE

      public static final RefPermission MERGE
    • SKIP_VALIDATION

      public static final RefPermission SKIP_VALIDATION
      Before checking this permission, the caller should verify USE_SIGNED_OFF_BY is false. If it's true, the request should be rejected directly without further check this permission.
    • CREATE_CHANGE

      public static final RefPermission CREATE_CHANGE
      Create a change to code review a commit.
    • CREATE_TAG

      public static final RefPermission CREATE_TAG
      Create a tag.
    • CREATE_SIGNED_TAG

      public static final RefPermission CREATE_SIGNED_TAG
      Create a signed tag.
    • UPDATE_BY_SUBMIT

      public static final RefPermission UPDATE_BY_SUBMIT
      Creates changes, then also immediately submits them during 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.

    • READ_PRIVATE_CHANGES

      public static final RefPermission READ_PRIVATE_CHANGES
      Can read all private changes on the ref. Typically granted to CI systems if they should run on private changes.
    • READ_CONFIG

      public static final RefPermission READ_CONFIG
      Read access to ref's config section in project.config.
    • WRITE_CONFIG

      public static final RefPermission WRITE_CONFIG
      Write access to ref's config section in project.config.
  • Method Details

    • values

      public static RefPermission[] 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

      public static RefPermission valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • describeForException

      public String 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 interface GerritPermission