How to make the button not disappear if the user does not have access to the page?

1
I have a page with several buttons on it, that lead to other pages. The users in the app have different role-based access permissions, so depending on the role some users can access all pages, while others can access only some of them. If the user doesn’t have access to the page, the button disappears, while I need to keep it on the page and look disabled and greyed out. So I created 2 versions for each button, active and inactive, and set role-based conditional visibility. It worked fine, but now I need to create users with multiple roles assigned. So this approach won’t work anymore, because now the users might see both versions of the button (active and disabled) at the same time.   So, what would be the not-hardcoding solution? I still need to use role-based access permissions, but I need  to make it so that if the user don’t have access to the page or a microflow, the button won’t disappear, but just become disabled.        
asked
1 answers
1

An option could be to create an NPE entity with a boolean per button. On opening of the page create the NPE and set the booleans based on the roles for the current user. Usethe associated entity to set the visibility via expersion for the buttons.

Be aware though that hiding the button, via visibility or roles does not remove the access to the button and these are still easily accessible from the browser console. Make sure that buttons without the possibilitiy to open the page are shown based on the permission booleans as descibed above and the correct permissions are set on the buttons(MF’s, pages) that allow the pages to be opened.

answered