We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
在debug 权限管理决断器(MyAccessDecisionManager), 看到authentication.getAuthorities() 权限操作集合里有角色的信息“ROLE_ADMIN” 这是在什么时候set的?
@Override public void decide(Authentication authentication, Object o, Collection<ConfigAttribute> configAttributes) throws AccessDeniedException, InsufficientAuthenticationException { if(configAttributes==null){ return; } Iterator<ConfigAttribute> iterator = configAttributes.iterator(); while (iterator.hasNext()){ ConfigAttribute c = iterator.next(); String needPerm = c.getAttribute(); //authentication.getAuthorities() 权限操作集合里有角色的信息“ROLE_ADMIN” ? for(GrantedAuthority ga : authentication.getAuthorities()) { // 匹配用户拥有的ga 和 系统中的needPerm if(needPerm.trim().equals(ga.getAuthority())) { return; } } } throw new AccessDeniedException("抱歉,您没有访问权限"); }
The text was updated successfully, but these errors were encountered:
读取当前用户信息时 UserDetails
Sorry, something went wrong.
No branches or pull requests
在debug 权限管理决断器(MyAccessDecisionManager), 看到authentication.getAuthorities() 权限操作集合里有角色的信息“ROLE_ADMIN” 这是在什么时候set的?
The text was updated successfully, but these errors were encountered: