Roles and Views
Roles and Views Tab
You can define user rights to access the report as well as report availability in certain application views in the Roles and views tab of the runtime report editor.
If the Resource roles list contains at least one role, the report will be available only to users with this role. If no role is specified, the report is available to everyone.
|
Keep in mind that in the report list view (the Reports→Reports menu item) all system reports are visible because this view is considered administrative. |
The Views list allows you to specify, in which views the report will be available when invoking RunReportAction, RunListEntityReportAction, RunSingleEntityReportAction or ShowExecutionReportHistoryAction actions. If no view is specified, the report won’t be available from any application view.
@AvailableForRoles
The @AvailableForRoles annotation specifies which resource roles can launch the defined report in specific views and actions when creating a report at design time. If this annotation is absent or the role list is empty, role-based restrictions are not applied, allowing any user to launch the report.
The @AvailableForRoles annotation has the following attributes:
-
roleCodes- resource role codes that should have access to the report. -
roleClasses- resource role definition interfaces (marked with@ResourceRole) that should have access to the report.
@AvailableInViews
The @AvailableInViews annotation defines in which views the report will be available when using standard reporting actions (from the io.jmix.reportsflowui.action package).
The @AvailableInViews annotation has the following attributes:
-
viewIds- IDs of views where the report will be available via standard actions. -
viewClasses- view controller classes where the report will be available via standard actions. The controller class must be annotated with@ViewController.