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.
-
-
Field Summary
Fields Modifier and Type Field Description protected String
_baseContext
The right context to useprotected boolean
_hasRight
Is the action in has right mode? or has not right mode?protected RightManager
_rightManager
The runtime rights manager-
Fields inherited from class org.apache.cocoon.acting.ServiceableAction
manager
-
Fields inherited from class org.apache.cocoon.acting.AbstractAction
EMPTY_MAP
-
-
Constructor Summary
Constructors Constructor Description HasRightAction()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map
act(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 Detail
-
_rightManager
protected RightManager _rightManager
The runtime rights manager
-
_hasRight
protected boolean _hasRight
Is the action in has right mode? or has not right mode?
-
_baseContext
protected String _baseContext
The right context to use
-
-
Constructor Detail
-
HasRightAction
public HasRightAction()
-
-
Method Detail
-
configure
public void configure(Configuration configuration) throws ConfigurationException
- Specified by:
configure
in interfaceConfigurable
- Throws:
ConfigurationException
-
service
public void service(ServiceManager smanager) throws ServiceException
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classServiceableAction
- Throws:
ServiceException
-
getBaseContext
protected String getBaseContext(Parameters parameters, Map objectModel)
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
-
-