public abstract class AbstractPortalPermissionChecker extends Object
Provides a basic Permission Check functionality for Portlets. This class should be Implemented for dedicated portal environments.
There can be specified cms groups for editing and viewing content and navigation elements (folders). Group Ids for view and edit rights have to be set in the properties file.
| Modifier and Type | Field and Description |
|---|---|
protected static Integer |
CMS_ANONYMOUS_GROUP
The cms anonymous group.
|
protected static String |
PROPERTY_CMS_ANONYMOUS_GROUP
The cms anonymous group property string .
|
| Constructor and Description |
|---|
AbstractPortalPermissionChecker() |
| Modifier and Type | Method and Description |
|---|---|
abstract Boolean |
checkEditPermission(javax.portlet.PortletRequest request,
com.gentics.cr.CRResolvableBean bean)
Checks the write permission for the given crBean.
|
abstract Boolean |
checkViewPermission(javax.portlet.PortletRequest request,
com.gentics.cr.CRResolvableBean bean)
Check the view permissions for the given crBean.
|
protected Map<String,List<Integer>> |
getEditRoleMap()
Getter method for editRoleMap.
|
abstract Subject |
getSubject(javax.portlet.PortletRequest request)
Returns the User Subject.
|
protected Map<String,List<Integer>> |
getViewRoleMap()
Getter method for viewRoleMap.
|
void |
init()
Initialize the PortalPermissionChecker and builds the role map.
|
abstract Boolean |
isLoggedIn(javax.portlet.PortletRequest request)
Checks if a user is logged in.
|
protected static Integer CMS_ANONYMOUS_GROUP
protected static String PROPERTY_CMS_ANONYMOUS_GROUP
public void init()
protected Map<String,List<Integer>> getViewRoleMap()
protected Map<String,List<Integer>> getEditRoleMap()
public abstract Boolean checkViewPermission(javax.portlet.PortletRequest request, com.gentics.cr.CRResolvableBean bean)
request - the requestbean - the beanpublic abstract Boolean checkEditPermission(javax.portlet.PortletRequest request, com.gentics.cr.CRResolvableBean bean)
request - the requestbean - the beanpublic abstract Boolean isLoggedIn(javax.portlet.PortletRequest request)
request - the requestpublic abstract Subject getSubject(javax.portlet.PortletRequest request) throws NamingException
request - the requestNamingException - the naming exceptionCopyright © 2022 Gentics Software. All rights reserved.