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
Modifier and TypeFieldDescriptionprotected String
The right context to useprotected boolean
Is the action in has right mode? or has not right mode?protected RightManager
The runtime rights managerFields inherited from class org.apache.cocoon.acting.ServiceableAction
manager
Fields inherited from class org.apache.cocoon.acting.AbstractAction
EMPTY_MAP
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionact
(Redirector redirector, SourceResolver resolver, Map objectModel, String source, Parameters parameters) void
configure
(Configuration configuration) protected String
getBaseContext
(Parameters parameters, Map objectModel) Return the base context when not specifiedvoid
service
(ServiceManager smanager) Methods inherited from class org.ametys.core.util.cocoon.AbstractCurrentUserProviderServiceableAction
_getCurrentUser
Methods 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:
configure
in interfaceConfigurable
- Throws:
ConfigurationException
-
service
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in 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
-