Files of this type are used in the Web Client and the Desktop Client blocks for registration of specific user permissions.
A set of permissions.xml
files, including the ones defined in base projects, is declared in the cuba.permissionConfig application property.
XML schema is available at http://schemas.haulmont.com/cuba/5.6/permissions.xsd.
The file has the following structure:
permission-config
- root element.
permission-config
elements:
-
specific
- specific permissions descriptor.specific
elements:-
category
- permissions category which is used for grouping permissions in the role edit screen.id
attribute is used as a key for retrieving a localized category name from the main message pack. -
permission
- named permission.id
attribute is used to obtain the permission value by theSecurity.isSpecificPermitted()
method, and as a key for retrieving a localized permission name form the main message pack to display the permission in the role edit screen.
-
For example:
<permission-config xmlns="http://schemas.haulmont.com/cuba/permissions.xsd"> <specific> <category id="app"> <permission id="app.doSomething"/> <permission id="app.doSomethingOther"/> </category> </specific> </permission-config>