Reputation: 673
I am trying to add a custom permission,i.e. specific to my custom model built with ServiceBuilder (see extract below from resource-actions/default.xml) . My portlet has already been deployed, and is being used.
I have two questions regarding this :
Best regards, Alain
extract of resource-actions default.xml file :
<permissions>
<supports>
<action-key>VIEW</action-key>
<action-key>DELETE</action-key>
...
<action-key>NEW_CUSTOM_PERMISSION</action-key>
</supports>
...
</permissions>
Upvotes: 0
Views: 1233
Reputation: 3133
The logic in the permission system is Roles -> Action-keys -> Resources
The 'Action-keys -> Resources' is defined in your portlet's business logic, and will be carried with it in other pages or portal instances. This way you can control how the resources (page, model, service builder entities, etc), will be controlled by exposed action keys, for EVERY instance of your portlet.
The 'Roles -> Action-keys' relationship can vary for instances of the same portlet in 2 ways:
You can imagine the action keys as an middle layer between the resources and the roles, giving you the abstraction create a great combination of role-to-resource bindings
Upvotes: 1