Files of this type are used in the Web Client and the Desktop Client blocks for registration of specific user permissions.
The file location is defined in the cuba.permissionConfig application property. When you create a new project in Studio, it creates the
web-permissions.xml file in the root package of the web module, for example
XML schema is available at http://schemas.haulmont.com/cuba/6.4/permissions.xsd.
The file has the following structure:
permission-config - root element.
specific- specific permissions descriptor.
category- permissions category which is used for grouping permissions in the role edit screen.
idattribute is used as a key for retrieving a localized category name from the main message pack.
permission- named permission.
idattribute is used to obtain the permission value by the
Security.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.
<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>