java.lang.Object
java.lang.Enum<UserRole>
eu.rarogsoftware.rarog.platform.api.user.management.UserRole
All Implemented Interfaces:
Serializable, Comparable<UserRole>, Constable

public enum UserRole extends Enum<UserRole>
Base user roles in Rarog system. It is used for first high level permission checks.
  • Enum Constant Details

    • ADMINISTRATOR

      public static final UserRole ADMINISTRATOR
      Represents role of Administrator user that can change system settings but cannot access system resources.
    • SYSTEM_ADMINISTRATOR

      public static final UserRole SYSTEM_ADMINISTRATOR
      Represents role of Administrator user with full power over system.
    • USER

      public static final UserRole USER
      Represents basic user without any administrative powers.
  • Method Details

    • values

      public static UserRole[] 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 UserRole 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
    • fromCode

      public static UserRole fromCode(int code)
    • getDatabaseCode

      public int getDatabaseCode()
    • getRole

      public String getRole()
    • getAuthority

      public org.springframework.security.core.GrantedAuthority getAuthority()