From 2b8972a35ab43fb5b3f5c61b6649d414d7c238c3 Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Sun, 24 Mar 2013 22:57:32 -0300 Subject: [PATCH] Add delete permission to admin. --- .../java/com/wisemapping/security/aop/BaseSecurityAdvice.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wise-webapp/src/main/java/com/wisemapping/security/aop/BaseSecurityAdvice.java b/wise-webapp/src/main/java/com/wisemapping/security/aop/BaseSecurityAdvice.java index 1a4d7f06..edb8e5a4 100755 --- a/wise-webapp/src/main/java/com/wisemapping/security/aop/BaseSecurityAdvice.java +++ b/wise-webapp/src/main/java/com/wisemapping/security/aop/BaseSecurityAdvice.java @@ -37,9 +37,9 @@ public abstract class BaseSecurityAdvice { boolean isAllowed; if (argument instanceof Mindmap) { - isAllowed = isAllowed(user, (Mindmap) argument); + isAllowed = isAllowed(user, (Mindmap) argument) || mindmapService.isAdmin(user); } else if (argument instanceof Integer) { - isAllowed = isAllowed(user, ((Integer) argument)); + isAllowed = isAllowed(user, ((Integer) argument)) || mindmapService.isAdmin(user); } else if (argument instanceof Collaborator) { // Read operation find on the user are allowed ... isAllowed = user.identityEquality((Collaborator) argument) || mindmapService.isAdmin(user);