Class RMMethodSecurityInterceptor
java.lang.Object
net.sf.acegisecurity.intercept.AbstractSecurityInterceptor
net.sf.acegisecurity.intercept.method.aopalliance.MethodSecurityInterceptor
org.alfresco.repo.security.permissions.impl.acegi.MethodSecurityInterceptor
org.alfresco.module.org_alfresco_module_rm.security.RMMethodSecurityInterceptor
- All Implemented Interfaces:
org.aopalliance.aop.Advice
,org.aopalliance.intercept.Interceptor
,org.aopalliance.intercept.MethodInterceptor
,org.springframework.beans.factory.Aware
,org.springframework.beans.factory.InitializingBean
,org.springframework.context.ApplicationContextAware
Records Management Method Security Interceptor.
Provides a way to record information about the capabilities being executed and report when an access denied exception is thrown.
- Since:
- 2.2
- Author:
- Roy Wetherall
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final org.apache.commons.logging.Log
loggerFields inherited from class net.sf.acegisecurity.intercept.AbstractSecurityInterceptor
logger
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
addMessage
(String message) Add a message to be displayed in the error report.static void
addMessage
(String message, Object... params) protected net.sf.acegisecurity.intercept.InterceptorStatusToken
beforeInvocation
(Object object) Gets the failure report for the currently recorded capabilities.invoke
(org.aopalliance.intercept.MethodInvocation mi) static void
isRMSecurityChecked
(boolean newValue) Indicates whether this is a RM security check or notstatic void
reportCapabilityCondition
(String name, String conditionName, boolean expected, boolean actual) Report capability condition.static void
reportCapabilityStatus
(String name, int status) Report capability status.Methods inherited from class org.alfresco.repo.security.permissions.impl.acegi.MethodSecurityInterceptor
pre
Methods inherited from class net.sf.acegisecurity.intercept.method.aopalliance.MethodSecurityInterceptor
getObjectDefinitionSource, getSecureObjectClass, obtainObjectDefinitionSource, setObjectDefinitionSource
Methods inherited from class net.sf.acegisecurity.intercept.AbstractSecurityInterceptor
afterInvocation, afterPropertiesSet, getAccessDecisionManager, getAfterInvocationManager, getAuthenticationManager, getRunAsManager, isValidateConfigAttributes, setAccessDecisionManager, setAfterInvocationManager, setApplicationContext, setAuthenticationManager, setRunAsManager, setValidateConfigAttributes
-
Field Details
-
LOGGER
protected static final org.apache.commons.logging.Log LOGGERlogger
-
-
Constructor Details
-
RMMethodSecurityInterceptor
public RMMethodSecurityInterceptor()
-
-
Method Details
-
isRMSecurityChecked
public static void isRMSecurityChecked(boolean newValue) Indicates whether this is a RM security check or not- Parameters:
newValue
- true if RM security check, false otherwise
-
addMessage
Add a message to be displayed in the error report.- Parameters:
message
- error message
-
addMessage
-
reportCapabilityStatus
Report capability status.- Parameters:
name
- capability namestatus
- capability status
-
reportCapabilityCondition
public static void reportCapabilityCondition(String name, String conditionName, boolean expected, boolean actual) Report capability condition.- Parameters:
name
- capability nameconditionName
- capability condition nameexpected
- expected valueactual
- actual value
-
getFailureReport
Gets the failure report for the currently recorded capabilities.- Returns:
String
capability error report
-
beforeInvocation
- Overrides:
beforeInvocation
in classnet.sf.acegisecurity.intercept.AbstractSecurityInterceptor
- See Also:
-
AbstractSecurityInterceptor.beforeInvocation(java.lang.Object)
-
invoke
- Specified by:
invoke
in interfaceorg.aopalliance.intercept.MethodInterceptor
- Overrides:
invoke
in classnet.sf.acegisecurity.intercept.method.aopalliance.MethodSecurityInterceptor
- Throws:
Throwable
- See Also:
-
MethodSecurityInterceptor.invoke(org.aopalliance.intercept.MethodInvocation)
-