%@ page import="com.imcode.imcms.api.*, java.util.*" errorPage="error.jsp" %>
There are three basic kinds of permissions:
In between "Full" and "Read" there can also be defined two that are modifiable:
Every document has a mapping of permissions to roles.
This is a map of the format (RoleName,DocumentPermissionSet)
Permissions mappings for document <%= documentId %>:
<% Map permissionsMap = document.getAllRolesMappedToPermissions(); Set roles = permissionsMap.keySet(); Iterator roleIterator = roles.iterator(); %>
<% if (imcmsSystem.getCurrentUser().canEdit( document )) { %> You have the following permissions for document <%= documentId %>: "<%= document.getDocumentPermissionSetForUser() %>" <% } else { %> You have no permissions for document <%= documentId %>. <% } %>
Notice: Only the roles that have some permissions are shown above. If a role has permission "None" then that role is not shown.