From b97d5b1a001041e4ce6a3be8fd9c55184a097c24 Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Wed, 5 Oct 2022 20:27:41 -0700 Subject: [PATCH] Fix removal of maps shared in read-only. --- .../security/aop/ViewBaseSecurityAdvise.java | 1 + .../com/wisemapping/service/MindmapService.java | 2 -- .../com/wisemapping/service/MindmapServiceImpl.java | 5 ----- .../src/main/webapp/WEB-INF/wisemapping-aop.xml | 13 +++++++------ 4 files changed, 8 insertions(+), 13 deletions(-) diff --git a/wise-webapp/src/main/java/com/wisemapping/security/aop/ViewBaseSecurityAdvise.java b/wise-webapp/src/main/java/com/wisemapping/security/aop/ViewBaseSecurityAdvise.java index 52c59944..c9807d61 100755 --- a/wise-webapp/src/main/java/com/wisemapping/security/aop/ViewBaseSecurityAdvise.java +++ b/wise-webapp/src/main/java/com/wisemapping/security/aop/ViewBaseSecurityAdvise.java @@ -38,6 +38,7 @@ public class ViewBaseSecurityAdvise @Override protected boolean isAllowed(@Nullable User user, Mindmap map) { + System.out.println("VIEWWWWWWWWWWWWW"); return getMindmapService().hasPermissions(user, map, CollaborationRole.VIEWER); } diff --git a/wise-webapp/src/main/java/com/wisemapping/service/MindmapService.java b/wise-webapp/src/main/java/com/wisemapping/service/MindmapService.java index 16b44a57..927a05ca 100755 --- a/wise-webapp/src/main/java/com/wisemapping/service/MindmapService.java +++ b/wise-webapp/src/main/java/com/wisemapping/service/MindmapService.java @@ -68,6 +68,4 @@ public interface MindmapService { LockManager getLockManager(); boolean isAdmin(@Nullable User user); - - void purgeHistory(int mapId) throws IOException; } 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 115cca8c..8207a662 100755 --- a/wise-webapp/src/main/java/com/wisemapping/service/MindmapServiceImpl.java +++ b/wise-webapp/src/main/java/com/wisemapping/service/MindmapServiceImpl.java @@ -91,11 +91,6 @@ public class MindmapServiceImpl return user != null && user.getEmail() != null && user.getEmail().equals(adminUser); } - @Override - public void purgeHistory(int mapId) throws IOException { - mindmapManager.purgeHistory(mapId); - } - @Override public Mindmap getMindmapByTitle(String title, User user) { return mindmapManager.getMindmapByTitle(title, user); diff --git a/wise-webapp/src/main/webapp/WEB-INF/wisemapping-aop.xml b/wise-webapp/src/main/webapp/WEB-INF/wisemapping-aop.xml index fe4d933c..3056c4c1 100755 --- a/wise-webapp/src/main/webapp/WEB-INF/wisemapping-aop.xml +++ b/wise-webapp/src/main/webapp/WEB-INF/wisemapping-aop.xml @@ -14,6 +14,8 @@ linkLabel find* filter* + + removeMindmap @@ -26,19 +28,18 @@ save* update* add* - remove* - purge* revert* + removeCollaboration - - - - + + + +