mirror of
https://codeup.aliyun.com/64f7d6b8ce01efaafef1e678/coal/coal.git
synced 2026-01-25 15:55:18 +08:00
bugfix
This commit is contained in:
@@ -125,12 +125,15 @@ public class AuthFilter extends OncePerRequestFilter {
|
||||
List<PermissionEntity> permissions = permissionService.getByType("0");
|
||||
|
||||
if (permissions.stream()
|
||||
.flatMap(
|
||||
x ->
|
||||
ObjectUtils.defaultIfNull(
|
||||
x.getResources(), new ArrayList<ResourceEntity>())
|
||||
.stream())
|
||||
.anyMatch(x -> StringUtils.equals(x.getId(), resource.get().getId()))) {
|
||||
.flatMap(
|
||||
x ->
|
||||
ObjectUtils.defaultIfNull(
|
||||
x.getResources(),
|
||||
new ArrayList<ResourceEntity>())
|
||||
.stream())
|
||||
.anyMatch(
|
||||
x -> StringUtils.equals(x.getId(), resource.get().getId()))
|
||||
|| BooleanUtils.isTrue(resource.get().getAnonymous())) {
|
||||
|
||||
sessionService.anonymousSession();
|
||||
UserEntity user = Ctx.currentUser();
|
||||
|
||||
Reference in New Issue
Block a user