In order to grant a permission to a role, you need a method. This method in
turn may only be executed by roles with a certain permission.
public void grant(Role role, Permission permission) {
        org.apache.shiro.subject.Subject subject =
SecurityUtils.getSubject();
        if (subject.isPermitted(certainPermission)) {
            role.addPermission(permission);
        } else {
            throw new Exception(..);
        }
}




--
View this message in context: 
http://shiro-user.582556.n2.nabble.com/Controlling-Permission-Granting-tp7580340p7580367.html
Sent from the Shiro User mailing list archive at Nabble.com.

Reply via email to