A.6. permissions.xml

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.

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 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.

For example:

<permission-config xmlns="http://schemas.haulmont.com/cuba/permissions.xsd">
        <category id="app">
            <permission id="app.doSomething"/>
            <permission id="app.doSomethingOther"/>