Change Role requires user to Re-Login

Change Role requires user to Re-Login

  
Hello all,

I have the following scenario (In which to access the Home Page, an X role is required) :
 * Admin logins;
 * User1 logins and is directed to Home Page;
 ** Admin removes User1 of all his roles, including X role, removing permissions to be on the Home Page; 
 ** User1 refreshes Home Page, and is not shown the "Invalid Permissions" error, although he has no Role for it;
 *** User1 logs out and login again, and this time is shown the "Invalid Permissions" error;

Shouldn't the user get warned he is out of permissions for that page without having to re-log in to receive such information?

Regards, Miguel Vieira



Simply reloading a page may not actually reload the page. One possibility is that the page may be stored in the browser cache and is being loaded from there and not from the server.
If the user is not logged out, the session will still hold the previous roles that were valid at the time of the login

You can always force a recheck of the values, but that needs to be done in your own logic, the platform doesn't give you mechanisms for this.

Best regards,
PC
Pedro Coelho wrote:

You can always force a recheck of the values, but that needs to be done in your own logic, the platform doesn't give you mechanisms for this.
 
 Hi, thanks for the reply!
Can you suggest a way to do this recheck?
I tried implementing a CheckRole action on my HomePage Presentation action, but the issue continued and the CheckRole action was verifying the roles he had on Login and not the Current ones.
 
Hello Miguel,

You can check out Miguel João's post here: http://www.outsystems.com/forums/discussion/9904/roles-users-sessions-and-more/ for more details.
He has uploaded an eSpace showing how you can check the Persistent roles assigned to a user, by going directly into the platform's datamodel.

Cheers,
Gonçalo Fonseca