Package org.gitlab4j.api.utils
Enum AccessTokenUtils.Scope
- All Implemented Interfaces:
Serializable
,Comparable<AccessTokenUtils.Scope>
,java.lang.constant.Constable
- Enclosing class:
- AccessTokenUtils
This enum defines the available scopes for a personal access token.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionGrants complete access to the API and Container Registry (read/write) (introduced in GitLab 8.15).Allows to read (pull) container registry images if a project is private and authorization is required (introduced in GitLab 9.3).Allows read-only access (pull) to the repository through git clone.Allows access to the read-only endpoints under /users.Allows performing API actions as any user in the system, if the authenticated user is an admin (introduced in GitLab 10.2).Grants read-write access to repositories on private projects using Git-over-HTTP (not using the API). -
Method Summary
Modifier and TypeMethodDescriptionstatic AccessTokenUtils.Scope
toString()
toValue()
static AccessTokenUtils.Scope
Returns the enum constant of this type with the specified name.static AccessTokenUtils.Scope[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
API
Grants complete access to the API and Container Registry (read/write) (introduced in GitLab 8.15). -
READ_REGISTRY
Allows to read (pull) container registry images if a project is private and authorization is required (introduced in GitLab 9.3). If the GitLab server you are using does not have the Registry properly configured, using this scope will result in an exception. -
READ_REPOSITORY
Allows read-only access (pull) to the repository through git clone. -
READ_USER
Allows access to the read-only endpoints under /users. Essentially, any of the GET requests in the Users API are allowed (introduced in GitLab 8.15). -
SUDO
Allows performing API actions as any user in the system, if the authenticated user is an admin (introduced in GitLab 10.2). -
WRITE_REPOSITORY
Grants read-write access to repositories on private projects using Git-over-HTTP (not using the API).
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified nameNullPointerException
- if the argument is null
-
forValue
-
toValue
-
toString
- Overrides:
toString
in classEnum<AccessTokenUtils.Scope>
-