Package org.ametys.web.pageaccess
Class CheckSitemapReadAccessAction
java.lang.Object
org.apache.avalon.framework.logger.AbstractLogEnabled
org.apache.cocoon.acting.AbstractAction
org.apache.cocoon.acting.ServiceableAction
org.ametys.cms.rights.CheckReadAccessAction
org.ametys.web.pageaccess.CheckSitemapReadAccessAction
- All Implemented Interfaces:
Component
,LogEnabled
,Serviceable
,Action
Tests if the current sitemap has some access restrictions.
- If the sitemap is not restricted, returns EMPTY_MAP. The page can be cached.
- If the sitemap is restricted and the current user is allowed, return null. The page 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 inherited from class org.ametys.cms.rights.CheckReadAccessAction
_currentUserProvider, _resolver, _rightManager
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 TypeMethodDescriptionprotected AmetysObject
getAmetysObject
(Parameters parameters, Request request) Get the Ametys object from either the parameters or the request attributes.Methods inherited from class org.ametys.cms.rights.CheckReadAccessAction
act, service
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
-
Constructor Details
-
CheckSitemapReadAccessAction
public CheckSitemapReadAccessAction()
-
-
Method Details
-
getAmetysObject
protected AmetysObject getAmetysObject(Parameters parameters, Request request) throws UnsupportedEncodingException Description copied from class:CheckReadAccessAction
Get the Ametys object from either the parameters or the request attributes.- Overrides:
getAmetysObject
in classCheckReadAccessAction
- Parameters:
parameters
- the action parameters.request
- the request.- Returns:
- the Ametys object or null if not found.
- Throws:
UnsupportedEncodingException
- if failed to decode object path
-