Enum AccessTokenUtils.Scope

    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      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).
      READ_REPOSITORY
      Allows read-only access (pull) to the repository through git clone.
      READ_USER
      Allows access to the read-only endpoints under /users.
      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).
    • Enum Constant Detail

      • API

        public static final AccessTokenUtils.Scope API
        Grants complete access to the API and Container Registry (read/write) (introduced in GitLab 8.15).
      • READ_REGISTRY

        public static final AccessTokenUtils.Scope 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

        public static final AccessTokenUtils.Scope READ_REPOSITORY
        Allows read-only access (pull) to the repository through git clone.
      • READ_USER

        public static final AccessTokenUtils.Scope 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

        public static final AccessTokenUtils.Scope 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

        public static final AccessTokenUtils.Scope WRITE_REPOSITORY
        Grants read-write access to repositories on private projects using Git-over-HTTP (not using the API).
    • Method Detail

      • values

        public static AccessTokenUtils.Scope[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (AccessTokenUtils.Scope c : AccessTokenUtils.Scope.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static AccessTokenUtils.Scope valueOf​(java.lang.String name)
        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:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • toValue

        public java.lang.String toValue()
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Enum<AccessTokenUtils.Scope>