Hi,
Is there a way to disable certain buttons, such as the export function? From the security aspect, in our organization the users can only display the information, but shouldn't be allow to export this information into an excel.
Is there a way to add roles, permissions, etc to all funtionalities?
Thanks and best regards
Hello Akash,
Thank you for reaching out to us.
To hide the Export tab, you can customize the Toolbar in Flexmonster. For example:
const pivot = new Flexmonster({
container: "pivot-container",
componentFolder: "https://cdn.flexmonster.com/",
toolbar: true,
beforetoolbarcreated: customizeToolbar
});
function customizeToolbar(toolbar) {
// Get all tabs
let tabs = toolbar.getTabs();
toolbar.getTabs = function() {
// Remove the Export tab using its id
tabs = tabs.filter(tab => tab.id != "fm-tab-export");
return tabs;
}
}
Feel free to check the following JSFiddle for reference: https://jsfiddle.net/flexmonster/yrbj2dgt/.
Kindly note that Flexmonster is a client-side component. This means you can restrict access to the page where Flexmonster is embedded and implement the necessary authorization technique in your application. Then, based on the provided user role, it is possible to adjust Flexmonster configurations (for example, make Flexmonster read-only). You can check the following thread for reference:
https://www.flexmonster.com/question/do-we-have-designer-and-viewer-screen-kind-of-option-in-flexmonster/#answer-49201
Please let us know if it works for you. Looking forward to hearing from you.
Kind regards,
Nadia
Hello Akash,
Hope you are doing well.
We were wondering if you had a chance to check the suggested approach. Could you please confirm if it works for you?
Looking forward to hearing your feedback.
Kind regards,
Nadia