From c976dbd5df07f62c2bf1334a215a4c2b4ecd99a9 Mon Sep 17 00:00:00 2001 From: mcortella Date: Mon, 24 Mar 2014 11:23:06 +0000 Subject: [PATCH] fix for bug: http://spagoworld.org/jira/browse/SPAGOBI-1673 [the Admin doesn't view the document in suspend state] git-svn-id: svn://svn.forge.objectweb.org/svnroot/spagobi/V_4.x/Server/trunk@22371 99afaf0d-6903-0410-885a-c66a8bbb5f81 --- .../commons/utilities/ObjectsAccessVerifier.java | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/SpagoBIDAO/src/it/eng/spagobi/commons/utilities/ObjectsAccessVerifier.java b/SpagoBIDAO/src/it/eng/spagobi/commons/utilities/ObjectsAccessVerifier.java index 54385913f..322fb065f 100644 --- a/SpagoBIDAO/src/it/eng/spagobi/commons/utilities/ObjectsAccessVerifier.java +++ b/SpagoBIDAO/src/it/eng/spagobi/commons/utilities/ObjectsAccessVerifier.java @@ -814,12 +814,18 @@ public static boolean canSee(BIObject obj, IEngUserProfile profile) throws EMFIn throw new EMFInternalError(EMFErrorSeverity.ERROR, "User profile in input is null!!"); } String state = obj.getStateCode(); - if ("SUSP".equalsIgnoreCase(state)) { - monitor.stop(); - return false; + if ("SUSP".equalsIgnoreCase(state)){ + if(! profile.isAbleToExecuteAction(SpagoBIConstants.DOCUMENT_MANAGEMENT_ADMIN)) { + monitor.stop(); + return false; + } else { + monitor.stop(); + return true; + } } + List foldersId = obj.getFunctionalities(); if (foldersId == null || foldersId.size() == 0){ logger.warn("BIObject does not belong to any functionality!!");