Package org.ametys.web.pageaccess
Class IsSitemapRestrictedAction
- java.lang.Object
-
- org.apache.avalon.framework.logger.AbstractLogEnabled
-
- org.apache.cocoon.acting.AbstractAction
-
- org.apache.cocoon.acting.ServiceableAction
-
- org.ametys.web.pageaccess.IsSitemapRestrictedAction
-
- All Implemented Interfaces:
Component
,LogEnabled
,Serviceable
,ThreadSafe
,Action
public class IsSitemapRestrictedAction extends ServiceableAction implements ThreadSafe
Tests if a given sitemap has some access restrictions.
- If the sitemap is not restricted, returns EMPTY_MAP. The resource can be cached.
- If the sitemap is restricted and the current user is allowed, return null. The resource can be served but can't be cached.
- If the sitemap is restricted but the current user is not allowed, an
AccessDeniedException
is thrown. - If the sitemap is restricted but no one is logged in, an
AuthorizationRequiredException
is thrown.
-
-
Field Summary
Fields Modifier and Type Field Description protected CurrentUserProvider
_currentUserProvider
The current user providerprotected RightManager
_rightManager
The right managerprotected SiteManager
_siteManager
The site manager.static String
REQUEST_ATTRIBUTE_DONOTCHECKRIGHTS
Set a boolean in this attribute.-
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 IsSitemapRestrictedAction()
-
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
service(ServiceManager serviceManager)
-
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
-
-
-
-
Field Detail
-
REQUEST_ATTRIBUTE_DONOTCHECKRIGHTS
public static final String REQUEST_ATTRIBUTE_DONOTCHECKRIGHTS
Set a boolean in this attribute. When true, this action whill not check rights- See Also:
- Constant Field Values
-
_siteManager
protected SiteManager _siteManager
The site manager.
-
_rightManager
protected RightManager _rightManager
The right manager
-
_currentUserProvider
protected CurrentUserProvider _currentUserProvider
The current user provider
-
-
Constructor Detail
-
IsSitemapRestrictedAction
public IsSitemapRestrictedAction()
-
-
Method Detail
-
service
public void service(ServiceManager serviceManager) throws ServiceException
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classServiceableAction
- Throws:
ServiceException
-
act
public Map act(Redirector redirector, SourceResolver resolver, Map objectModel, String source, Parameters parameters) throws Exception
-
-