AccessService¶
com.imcode.imcms.domain.service
This service is designed to obtain information about user permissions in a individual document and the whole system.
Initialization¶
AccessService accessService = Imcms.getServices().getAccessService();
Methods¶
boolean hasUserPublishAccess(UserDomainObject user, int docId);
check the user’s access to the publication of the document.
RestrictedPermission getPermission(UserDomainObject user, int documentId);
get data about the user’s permissions in a specific document.
RolePermissions getTotalRolePermissionsByUser(UserDomainObject user);
get data about the user’s permissions in the whole system.
boolean hasUserFileAdminAccess(int userId);
check the user’s access to the Files tab on the Admin page.
boolean hasUserEditAccess(UserDomainObject user, Integer documentId, AccessContentType accessContentType);
check the user’s access to Page Info or editing any type of content.
AccessContentType
has following values: ALL
, IMAGE
, TEXT
, MENU
, LOOP
, DOC_INFO
.