Search in sources :

Example 1 with AllPermission

use of org.apache.shiro.authz.permission.AllPermission in project graylog2-server by Graylog2.

the class RootAccountRealm method addRootAccount.

private void addRootAccount(String username, String password) {
    LOG.debug("Adding root account named {}, having all permissions", username);
    add(new SimpleAccount(username, password, getName(), CollectionUtils.asSet("root"), CollectionUtils.<Permission>asSet(new AllPermission())));
}
Also used : SimpleAccount(org.apache.shiro.authc.SimpleAccount) AllPermission(org.apache.shiro.authz.permission.AllPermission) Permission(org.apache.shiro.authz.Permission) AllPermission(org.apache.shiro.authz.permission.AllPermission)

Aggregations

SimpleAccount (org.apache.shiro.authc.SimpleAccount)1 Permission (org.apache.shiro.authz.Permission)1 AllPermission (org.apache.shiro.authz.permission.AllPermission)1