*
*/
protected AuthorizationInfo doGetAuthorizationInfo(PrincipalCollection principals) {
SimpleAuthorizationInfo info = new SimpleAuthorizationInfo();
SessionVariable model = principals.oneByType(SessionVariable.class);
Assert.notNull(model, "找不到principals中的SessionVariable");
String id = model.getUser().getId();
//加载用户资源信息
List<Resource> authorizationInfo = accountManager.getUserResources(id);
List<Resource> resourcesList = accountManager.mergeResourcesToParent(authorizationInfo, ResourceType.Security);
model.setAuthorizationInfo(authorizationInfo);
model.setMenusList(resourcesList);
//添加用户拥有的permission
addPermissions(info,authorizationInfo);
return info;