diff --git a/wise-webapp/src/main/java/com/wisemapping/security/MapAccessPermissionEvaluation.java b/wise-webapp/src/main/java/com/wisemapping/security/MapAccessPermissionEvaluation.java index fd31c897..868d5bf5 100644 --- a/wise-webapp/src/main/java/com/wisemapping/security/MapAccessPermissionEvaluation.java +++ b/wise-webapp/src/main/java/com/wisemapping/security/MapAccessPermissionEvaluation.java @@ -47,7 +47,6 @@ public class MapAccessPermissionEvaluation implements PermissionEvaluator { result = hasPrivilege(map, perm); } else if (targetDomainObject instanceof Collaborator collab) { // Read only operations checks ... - assert user != null; result = user.identityEquality(collab) || readAdvice.getMindmapService().isAdmin(user); } else { throw new IllegalArgumentException("Unsupported check control of permissions"); diff --git a/wise-webapp/src/main/java/com/wisemapping/service/MindmapServiceImpl.java b/wise-webapp/src/main/java/com/wisemapping/service/MindmapServiceImpl.java index 57969536..1bcf1a0c 100755 --- a/wise-webapp/src/main/java/com/wisemapping/service/MindmapServiceImpl.java +++ b/wise-webapp/src/main/java/com/wisemapping/service/MindmapServiceImpl.java @@ -168,7 +168,7 @@ public class MindmapServiceImpl } @Override - @PreAuthorize("hasAnyRole('USER', 'ADMIN') && hasPermission(#mindmap, 'WRITE')") + @PreAuthorize("hasPermission(#mindmap, 'WRITE')") public void addMindmap(@NotNull Mindmap mindmap, @NotNull User user) { final String title = mindmap.getTitle();