Page Refresh when Roles Change for the User - Mendix Forum

Page Refresh when Roles Change for the User

0

I have a case where a user is part of 2 or more roles and he has to perform 2 or 3 actions accordingly on the mendix page.

So if a user role is one, then he can do task1

and if user role is two, then he can do task2

so , the issue now is that when user completes his task1 and changes the role to perform task2, the user gets errors related to permissions.

‘executing action failed for security reason’ : microflowname

but when i do a page refresh, the permission get fixed and the error is not there.

but its seems inappropriate for user to do a refresh of the page everytime he has to change a role.

i tried looking up on the forum and they ask to use a “refresh page” add-on, but still it requires user to refresh the page even after the role has been changed in the backend.   

so this question is ,  is there a way to resolve this with my version 8.15 or is this resolved in newer version ?

or is there currently a solution to this . 

if not can this feature be enabled ( refresh is client refreshes part of the data on the page)

asked
2 answers

Hi Marcus, thanks for the response.  Can you explain a bit more or guide me to some document on how this can be done. Currently the pages a user sees and edits is controlled by role permissions.  Everything works good, except that a refresh of page is needed…

 

Created

When a role is changed for an user the client needs to refresh to retrieve the new model metadata. This is currently not triggered by Mendix because the backend doesn’t communicate role changes to the frontend automatically. A page refresh is possible using Custom Widgets or JavaScript Actions. But maybe you can bypass the problem by not using roles but model the tasks using the status enumeration of the main entity?

Created