mirror of
https://gitee.com/y_project/RuoYi-Cloud.git
synced 2026-01-30 05:21:56 +08:00
优化配置参数的名字和日志输出级别
This commit is contained in:
@@ -133,21 +133,21 @@ public class AuthFilter implements GlobalFilter, Ordered
|
||||
|
||||
if(!rolePerms.isEmpty()) {
|
||||
if(rolePerms.contains(SecurityConstants.ROLE_ANON)) {
|
||||
log.info("允许访问公共权限:{},{}", api, rolePerms);
|
||||
log.debug("允许访问公共权限:{},{}", api, rolePerms);
|
||||
return true;
|
||||
}
|
||||
rolePerms = rolePerms.stream().map(item -> item.substring(SecurityConstants.ROLE_PREFIX.length())).collect(Collectors.toSet());
|
||||
// 求交集
|
||||
rolePerms.retainAll(roles);
|
||||
if(!rolePerms.isEmpty()) {
|
||||
log.info("允许访问角色权限:{}, {}", api, rolePerms);
|
||||
log.debug("允许访问角色权限:{}, {}", api, rolePerms);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
// 求交集
|
||||
matchedPerms.retainAll(permissions);
|
||||
if(!matchedPerms.isEmpty()) {
|
||||
log.info("允许访问资源权限:{},{}", api, matchedPerms);
|
||||
log.debug("允许访问资源权限:{},{}", api, matchedPerms);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user