Example usage for org.apache.shiro.authz SimpleRole SimpleRole

List of usage examples for org.apache.shiro.authz SimpleRole SimpleRole

Introduction

In this page you can find the example usage for org.apache.shiro.authz SimpleRole SimpleRole.

Prototype

public SimpleRole(String name, Set<Permission> permissions) 

Source Link

Usage

From source file:com.freedomotic.plugins.devices.restapiv3.resources.jersey.RoleResource.java

License:Open Source License

@Override
protected URI doCopy(String UUID) {
    SimpleRole sr = api.getAuth().getRole(UUID);
    if (sr != null) {
        SimpleRole s2 = new SimpleRole("CopyOf-" + sr.getName(), sr.getPermissions());
        api.getAuth().addRole(s2);//  w w  w.ja  va  2  s  .  c o m
        return createUri(s2.getName());
    }
    return null;
}