|
|
@@ -31,7 +31,6 @@ public class AuthorizationManager implements ReactiveAuthorizationManager<Author
|
|
|
// todo 资源权限角色关系列表,需要初始化到容器中
|
|
|
Map<Object, Object> resourceRolesMap = new HashMap<>();
|
|
|
resourceRolesMap.put("/token/**","force");
|
|
|
- resourceRolesMap.put("/**/orchestration/calendarRelease/**","delete-force");
|
|
|
Iterator<Object> iterator = resourceRolesMap.keySet().iterator();
|
|
|
List<String> authorities = new ArrayList<>();
|
|
|
while (iterator.hasNext()) {
|
|
|
@@ -45,6 +44,9 @@ public class AuthorizationManager implements ReactiveAuthorizationManager<Author
|
|
|
.flatMapIterable(Authentication::getAuthorities)
|
|
|
.map(GrantedAuthority::getAuthority)
|
|
|
.any(roleId -> {
|
|
|
+ log.info("访问路径:{}", path);
|
|
|
+ log.info("用户角色roleId:{}", roleId);
|
|
|
+ log.info("资源需要权限authorities:{}", authorities);
|
|
|
return authorities.contains(roleId);
|
|
|
})
|
|
|
.map(AuthorizationDecision::new)
|