Package org.ametys.plugins.core.right
Class HasRightAction
- All Implemented Interfaces:
Component,Configurable,LogEnabled,Serviceable,ThreadSafe,Action
- Direct Known Subclasses:
HasNotAdminRightAction,HasRightAction
public class HasRightAction
extends AbstractCurrentUserProviderServiceableAction
implements Configurable
This action determines if the user has a right given in src.
return EMPTY_MAP if the user has right and null otherwise
You can use the 'context' parameter to specify the right context. / is the default value.
return EMPTY_MAP if the user has right and null otherwise
You can use the 'context' parameter to specify the right context. / is the default value.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected StringThe right context to useprotected booleanIs the action in has right mode? or has not right mode?protected RightManagerThe runtime rights managerFields inherited from class org.apache.cocoon.acting.ServiceableAction
managerFields inherited from class org.apache.cocoon.acting.AbstractAction
EMPTY_MAP -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionact(Redirector redirector, SourceResolver resolver, Map objectModel, String source, Parameters parameters) voidconfigure(Configuration configuration) protected StringgetBaseContext(Parameters parameters, Map objectModel) Return the base context when not specifiedvoidservice(ServiceManager smanager) Methods inherited from class org.ametys.core.util.cocoon.AbstractCurrentUserProviderServiceableAction
_getCurrentUserMethods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
-
Field Details
-
_rightManager
The runtime rights manager -
_hasRight
Is the action in has right mode? or has not right mode? -
_baseContext
The right context to use
-
-
Constructor Details
-
HasRightAction
public HasRightAction()
-
-
Method Details
-
configure
- Specified by:
configurein interfaceConfigurable- Throws:
ConfigurationException
-
service
- Specified by:
servicein interfaceServiceable- Overrides:
servicein classServiceableAction- Throws:
ServiceException
-
getBaseContext
Return the base context when not specified- Parameters:
parameters- The sitemap parametersobjectModel- the objectModel of the calling environment- Returns:
- the base context when not specified
-
act
public Map act(Redirector redirector, SourceResolver resolver, Map objectModel, String source, Parameters parameters) throws Exception
-