For example, GroupTable export to excel standard action ExcelAction is allowed for everyone by default.
I need disallow it by default and manage allow permission for every table throu roles.
What I do:
create separate specific permission in web-permissions.xml for every table (screen) I need
set action disabled:
check permission in screen controller:
@Subscribe
public void onBeforeShow(BeforeShowEvent event) {
if (security.isSpecificPermitted("app.exportExcel.subdivisions")) {
excelBtn.getAction().setEnabled(true);
} else {
// just in case as action disabled by default: <action id="excel" type="excel" enable="false"/>
excelBtn.getAction().setEnabled(false);
}
}