Package org.ametys.web.pageaccess
Class CheckPageReadAccessAction
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.CheckPageReadAccessAction
- All Implemented Interfaces:
Component,LogEnabled,Serviceable,Action
Tests if the current page has some access restrictions.
- If the page is not restricted, returns EMPTY_MAP. The page can be cached.
- If the page is restricted and the current user is allowed, return null. The page can be served but can't be cached.
- If the page is restricted but the current user is not allowed, an
AccessDeniedExceptionis thrown. - If the page is restricted but no one is logged in, an
AuthorizationRequiredExceptionis thrown.
-
Field Summary
Fields inherited from class org.ametys.cms.rights.CheckReadAccessAction
_currentUserProvider, _resolver, _rightManagerFields inherited from class org.apache.cocoon.acting.ServiceableAction
managerFields inherited from class org.apache.cocoon.acting.AbstractAction
EMPTY_MAP -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected AmetysObjectgetAmetysObject(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, serviceMethods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
-
Constructor Details
-
CheckPageReadAccessAction
public CheckPageReadAccessAction()
-
-
Method Details
-
getAmetysObject
protected AmetysObject getAmetysObject(Parameters parameters, Request request) throws UnsupportedEncodingException Description copied from class:CheckReadAccessActionGet the Ametys object from either the parameters or the request attributes.- Overrides:
getAmetysObjectin 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
-