use of com.fruit.manage.model.User in project fruit-manage by liuzhaozhao.
the class ShiroDbRealm method doGetAuthorizationInfo.
/**
* 权限认证
*
* @param principalCollection
* @return
*/
@Override
protected AuthorizationInfo doGetAuthorizationInfo(PrincipalCollection principals) {
User user = (User) principals.getPrimaryPrincipal();
SimpleAuthorizationInfo info = new SimpleAuthorizationInfo();
if (user == null) {
return info;
}
int id = user.getId();
authRole(id, info);
return info;
}
Aggregations