3 * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved.
5 * This program and the accompanying materials are made available under the
6 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
7 * and is available at http://www.eclipse.org/legal/epl-v10.html
10 package org.opendaylight.controller.sal.authorization;
12 import java.io.Serializable;
15 * Describes the user role level in the controller space
18 public enum UserLevel implements Serializable {
19 SYSTEMADMIN(0, "System-Admin", "System Administrator"), // can do everything
20 NETWORKADMIN(1, "Network-Admin", "Network Administrator"), // can do everything but setting a system admin user profile
21 NETWORKOPERATOR(2, "Network-Operator", "Network Operator"), // can only see what is configured anywhere
22 CONTAINERUSER(4, "Container-User", "Container User"), // container context user
23 APPUSER(5, "App-User", "Application User"), // application context user
24 NOUSER(255, "Not Authorized", "Not Authorized");
26 private int userLevel;
28 private String prettyLevel;
30 private UserLevel(int userlevel, String level, String prettyLevel) {
31 this.userLevel = userlevel;
33 this.prettyLevel = prettyLevel;
36 public int toNumber() {
37 return this.userLevel;
40 public String toString() {
44 public String toStringPretty() {
45 return this.prettyLevel;