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.usermanager;
12 import java.util.Locale;
14 import org.opendaylight.controller.sal.authorization.UserLevel;
15 import org.springframework.security.core.GrantedAuthority;
17 public class ODLUserLevel implements GrantedAuthority {
18 private static final long serialVersionUID = 1L;
21 public ODLUserLevel(UserLevel userLevel) {
22 this.userLevel = userLevel;
26 public String getAuthority() {
27 return "ROLE_" + this.userLevel.toString().toUpperCase(Locale.ENGLISH);