Home > Back-end >  Shrio framework the landing permissions assigned doGetAuthorizationInfo amplification was repeated
Shrio framework the landing permissions assigned doGetAuthorizationInfo amplification was repeated

Time:12-02

//this is to allocate
Protected AuthorizationInfo doGetAuthorizationInfo PrincipalCollection (principals) {
The Account users.=(Account) the SecurityUtils getSubject (). GetPrincipal ();
Set Roles=new HashSet (a);
Set Role=new HashSet (a);
List List=tpermissionMapper. SelectRoleNameByUserId (users. GetAccountsystemrolerid ());
Roles. The add (users. GetAccountsystemrolerid () + "");
System. Err. Println (list. The size ());
For (TPermission permission: list) {
If (permission. GetTpermissionlist (.) getWebpermissionidlistenabled ()==1) {
Role. The add (permission. GetTpermissionlist () getWebpermissionidurl ());
}
}
count++;
System. Err. Println (" this method is the number "+ count);
SimpleAuthorizationInfo SimpleAuthorizationInfo=new SimpleAuthorizationInfo ();
SimpleAuthorizationInfo. SetRoles (roles);
SimpleAuthorizationInfo. SetStringPermissions (role);
Return simpleAuthorizationInfo;
}
//this page is using shiro: hasPermission tag





Have bosses know why will be performed many times??????
  • Related