public class ContentAccessManager extends AbstractLogEnabled implements Component, Serviceable
| Modifier and Type | Class and Description |
|---|---|
static class |
ContentAccessManager.ContentAccess
Enumeration representing a content access status.
|
| Modifier and Type | Field and Description |
|---|---|
protected CurrentUserProvider |
_currentUserProvider
The current user provider
|
protected ProfileAssignmentStorageExtensionPoint |
_profileAssignmentStorageEP
The component handling profile storage
|
protected RightManager |
_rightManager
The right manager
|
static String |
ROLE
The component role.
|
| Constructor and Description |
|---|
ContentAccessManager() |
| Modifier and Type | Method and Description |
|---|---|
private ContentAccessManager.ContentAccess |
_getContentAccess(Content content,
UserIdentity userIdentity,
boolean checkUser) |
ContentAccessManager.ContentAccess |
getAccess(Content content)
Get the access status of a content, from the user currently connected to the front-office.
|
ContentAccessManager.ContentAccess |
getAccess(Content content,
boolean checkUser)
Get the access status of a content, from the user currently connected to the front-office.
|
ContentAccessManager.ContentAccess |
getAccess(Content content,
UserIdentity userIdentity)
Get the access status of a content from a given user.
|
ContentAccessManager.ContentAccess |
getAccess(Content content,
UserIdentity userIdentity,
boolean checkUser)
Get the access status of a content from a given user.
|
boolean |
isAccessibleByPage(WebContent content,
Page currentPage)
Test if the content is displayed in a page having the same access rights as the current page.
|
void |
service(ServiceManager manager) |
enableLogging, getLogger, setupLogger, setupLogger, setupLoggerprotected RightManager _rightManager
protected CurrentUserProvider _currentUserProvider
protected ProfileAssignmentStorageExtensionPoint _profileAssignmentStorageEP
public ContentAccessManager()
public void service(ServiceManager manager) throws ServiceException
service in interface ServiceableServiceExceptionpublic ContentAccessManager.ContentAccess getAccess(Content content)
content - the content to test.public ContentAccessManager.ContentAccess getAccess(Content content, boolean checkUser)
content - the content to test.checkUser - When true, the user's ability to view the page will be checked
(ContentAccessManager.ContentAccess.ALLOWED may be returned).ContentAccessManager.ContentAccess.ALLOWED will never be returned.public ContentAccessManager.ContentAccess getAccess(Content content, UserIdentity userIdentity)
content - the content to test.userIdentity - the user identity, can be null (to test anonymous access).public ContentAccessManager.ContentAccess getAccess(Content content, UserIdentity userIdentity, boolean checkUser)
content - the content to test.userIdentity - the user identity, can be null (to test anonymous access).checkUser - When true, the user's ability to view the page will be checked
(ContentAccessManager.ContentAccess.ALLOWED may be returned).ContentAccessManager.ContentAccess.ALLOWED will never be returned.private ContentAccessManager.ContentAccess _getContentAccess(Content content, UserIdentity userIdentity, boolean checkUser)
public boolean isAccessibleByPage(WebContent content, Page currentPage)
content - the web content.currentPage - the current page.