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
public class CheckPageReadAccessAction extends CheckReadAccessAction
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, _rightManager
-
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 CheckPageReadAccessAction()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected 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, service
-
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
-
-
-
-
Constructor Detail
-
CheckPageReadAccessAction
public CheckPageReadAccessAction()
-
-
Method Detail
-
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
-
-