We can assign filter edit option to users by granting access to : UI edit filter
What role should we assign to an end user to grant access to the filter - just an user of predefined filter, not let him modify the filter configuration?
We can assign filter edit option to users by granting access to : UI edit filter
What role should we assign to an end user to grant access to the filter - just an user of predefined filter, not let him modify the filter configuration?
Hi!
Access to editing filter configurations is provided using specific
policies. You can find a list of them on the Jmix Studio on the Specific
tab on the resource role editing designer:
The UI: edit filters
role contains these specifics and access policies for the system entities filters and configurations.
Thus, to allow the user to only use and view configurations, it is necessary to create a corresponding role.
Here is an example:
@ResourceRole(name = "FilterUserRole", code = FilterUserRole.CODE, scope = UI)
public interface FilterUserRole {
String CODE = "filter-user-role";
@ViewPolicy(viewIds = {"flowui_AddConditionView", "flowui_DateIntervalDialog"})
@EntityPolicy(entityName = "flowui_FilterConfiguration", actions = EntityPolicyAction.READ)
@EntityAttributePolicy(entityName = "flowui_FilterConfiguration", attributes = "*", action = EntityAttributePolicyAction.VIEW)
void configuration();
@ViewPolicy(viewIds = "flowui_GroupFilterCondition.detail")
@EntityPolicy(entityClass = GroupFilterCondition.class, actions = EntityPolicyAction.READ)
@EntityAttributePolicy(entityClass = GroupFilterCondition.class, attributes = "*", action = EntityAttributePolicyAction.VIEW)
@EntityPolicy(entityClass = FilterCondition.class, actions = EntityPolicyAction.READ)
@EntityAttributePolicy(entityClass = FilterCondition.class, attributes = "*", action = EntityAttributePolicyAction.VIEW)
void groupFilter();
@ViewPolicy(viewIds = "flowui_PropertyFilterCondition.detail")
@EntityPolicy(entityClass = PropertyFilterCondition.class, actions = EntityPolicyAction.READ)
@EntityAttributePolicy(entityClass = PropertyFilterCondition.class, attributes = "*", action = EntityAttributePolicyAction.VIEW)
void propertyFilter();
@ViewPolicy(viewIds = "flowui_JpqlFilterCondition.detail")
@EntityPolicy(entityClass = JpqlFilterCondition.class, actions = EntityPolicyAction.READ)
@EntityAttributePolicy(entityClass = JpqlFilterCondition.class, attributes = "*", action = EntityAttributePolicyAction.VIEW)
void jpqlFilter();
}
Dmitriy
Thank you Dmitriy, I shall try your code.