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
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
Modifier and TypeFieldDescriptionprotected CurrentUserProvider
The current user providerprotected RightManager
The right managerprotected SiteManager
The site manager.static final String
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
-
Method Summary
Modifier and TypeMethodDescriptionact
(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 Details
-
REQUEST_ATTRIBUTE_DONOTCHECKRIGHTS
Set a boolean in this attribute. When true, this action whill not check rights- See Also:
-
_siteManager
The site manager. -
_rightManager
The right manager -
_currentUserProvider
The current user provider
-
-
Constructor Details
-
IsSitemapRestrictedAction
public IsSitemapRestrictedAction()
-
-
Method Details
-
service
- 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
-