PermResource
Resource for reading and writing permissions.
The following table can be used to look up the bit positions (starting at 0) of the folder permissions:
Type | Short | Description | Bit |
---|---|---|---|
Folder | s | Show | 0 |
r | Assign user permissions | 1 | |
c | Create | 8 | |
e | Edit | 9 | |
d | Delete | 10 | |
Pages/Images/Files | s | Show | 11 |
c | Create | 12 | |
e | Edit | 13 | |
d | Delete | 14 | |
i | Import | 23 | |
Pages | p | Publish | 19 |
Templates | s | Show | 15 |
c | Create | 16 | |
l | Link | 21 | |
e | Edit | 17 | |
d | Delete | 18 | |
Workflow | v | Link | 22 |
The following table can be used to look up the bit positions (starting at 0) of the role permissions:
Type | Description | Bit |
---|---|---|
Role permissions | Show | 10 |
Create | 11 | |
Modify | 12 | |
Delete | 13 | |
Publishing | 14 | |
Translate | 15 |
The following resources are applicable:
/perm/{perm}/{type}/{id}
Mount Point: /CNPortletapp/rest/perm/{perm}/{type}/{id}
GET
Check whether the user has permission perm on the object defined by type and id
Parameters
name | description | type | default |
---|---|---|---|
perm | permission | path | |
type | object type | path | |
id | object id | path | |
nodeId | node id | query | 0 |
Response Body
element: | permResponse |
media types: | application/json |
response containing the result
/perm/{type}/{id}
Mount Point: /CNPortletapp/rest/perm/{type}/{id}
GET
Get the permission bits valid for the current user on the given object (and optionally for the given node).
See the class description for the permission bits.
To get the folder permissions you need to provide the type (10002 = Folder, 10001 = Node) and the object id.
To get the role permissions you need to provide the languageId and the type to check for (10007 = Pages, 10008 = Files).
Parameters
name | description | type | default |
---|---|---|---|
type | object type (10002 = Folder, 10001 = Node) | path | |
id | object id | path | |
nodeId | optional node id | query | 0 |
type | optional type for which the role permission should be returned (10007 = Pages, 10008 = Files) | query | -1 |
lang | optional language id for which the role permissions should be returned | query | 0 |
Response Body
element: | permBitsResponse |
media types: | application/json |
permission bits response
POST
Set the permissions on the identified object according to the posted request
Parameters
name | description | type | default |
---|---|---|---|
type | object type | path | |
id | object id | path |
Request Body
element: | setPermsRequest |
media types: | */* application/xml application/json |
request
Response Body
element: | genericResponse |
media types: | */* application/xml application/json |
generic response
/perm/list/{type}/{id}
Mount Point: /CNPortletapp/rest/perm/list/{type}/{id}
GET
List all groups with with their permission bits for the given object This only lists groups that the current user actually has permission to view (his own groups and their sub groups)
Parameters
name | description | type | default |
---|---|---|---|
type | Type of the object | path | |
id | ID of the object | path |
Response Body
element: | groupsPermBitsResponse |
media types: | application/json |
generic GroupsPermBitsResponse object