summaryrefslogtreecommitdiff
path: root/pse-server/src/main/java/org/psesquared/server/model/Role.java
blob: 37a316fc9cb9aae0459fb75f76bdcc051cdf0f76 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
package org.psesquared.server.model;

/**
 * Available user roles.
 */
public enum Role {

  /**
   * Standard role.
   */
  USER,

  /**
   * Privileged role.
   */
  ADMIN;

  /**
   * The starting index.
   */
  private static final int FIRST_INDEX = 0;

  @Override
  public String toString() {
    return name().charAt(FIRST_INDEX) + name().substring(1).toLowerCase();
  }

}