jmix-framework / jmix

Jmix framework
https://www.jmix.io
Apache License 2.0
695 stars 124 forks source link

Hide 'Create Full-text condition' item if not allowed #307

Open Gavrilov-Ivan opened 3 years ago

Gavrilov-Ivan commented 3 years ago

'Create Full-text condition' item should not be displayed if user is not granted to create such conditions. image

Gavrilov-Ivan commented 3 years ago

It's not possible to control visibility of menu items on addon side only. Actions are added to menu within io.jmix.ui.app.filter.condition.AddConditionScreen#initCreatePopupButton (jmix-ui). Possible solution: implementations of FilterCondition should optionally (e.g. via additional interface) provide name of some specific permission. If it'is provided it should be checked via SpecificOperationAccessContext within io.jmix.ui.app.filter.condition.AddConditionScreen#initCreatePopupButton. This is already done directly for JpqlFilterCondition.