mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
RM-2129 (Check classification before method execution)
* Renamed ClassificationEnformentException to AccessDeniedException git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@108657 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -38,7 +38,7 @@ import java.util.concurrent.locks.ReentrantReadWriteLock;
|
||||
import org.alfresco.error.AlfrescoRuntimeException;
|
||||
import org.alfresco.model.ContentModel;
|
||||
import org.alfresco.module.org_alfresco_module_rm.caveat.RMListOfValuesConstraint.MatchLogic;
|
||||
import org.alfresco.module.org_alfresco_module_rm.classification.interceptor.processor.ClassificationEnforcementException;
|
||||
import org.alfresco.module.org_alfresco_module_rm.classification.interceptor.processor.AccessDeniedException;
|
||||
import org.alfresco.module.org_alfresco_module_rm.model.RecordsManagementModel;
|
||||
import org.alfresco.repo.cache.SimpleCache;
|
||||
import org.alfresco.repo.content.ContentServicePolicies;
|
||||
@@ -687,7 +687,7 @@ public class RMCaveatConfigComponentImpl implements ContentServicePolicies.OnCon
|
||||
return true;
|
||||
}
|
||||
}
|
||||
catch (ClassificationEnforcementException cee)
|
||||
catch (AccessDeniedException ade)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
@@ -21,12 +21,12 @@ package org.alfresco.module.org_alfresco_module_rm.classification.interceptor.pr
|
||||
import org.alfresco.error.AlfrescoRuntimeException;
|
||||
|
||||
/**
|
||||
* Classification enforcement exception
|
||||
* Access denied exception thrown when a user tries to execute a method call on an uncleared node.
|
||||
*
|
||||
* @author Tuna Aksoy
|
||||
* @since 3.0
|
||||
*/
|
||||
public class ClassificationEnforcementException extends AlfrescoRuntimeException
|
||||
public class AccessDeniedException extends AlfrescoRuntimeException
|
||||
{
|
||||
/** Serial version uid */
|
||||
private static final long serialVersionUID = -1546218007029075883L;
|
||||
@@ -36,7 +36,7 @@ public class ClassificationEnforcementException extends AlfrescoRuntimeException
|
||||
*
|
||||
* @param key The key of the exception to be localized
|
||||
*/
|
||||
public ClassificationEnforcementException(String key)
|
||||
public AccessDeniedException(String key)
|
||||
{
|
||||
super(key);
|
||||
}
|
@@ -228,8 +228,8 @@ public class PreMethodInvocationProcessor implements ApplicationContextAware
|
||||
String methodName = method.getName();
|
||||
String name = className + "." + methodName;
|
||||
|
||||
throw new ClassificationEnforcementException("The user '" + getFullyAuthenticatedUser() + "' called the method '"
|
||||
+ name + "' for the node '" + nodeRef + "' but is not cleared to see it.");
|
||||
throw new AccessDeniedException("Access is denied for the user '" + getFullyAuthenticatedUser()
|
||||
+ "' to call the method '" + name + "' for the node '" + nodeRef + "'.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user