Role anonymous to user

Hi,  I am changing the role of an anonymous user to a role of “user”, then I show a page (my home page) only accessible for an user, but I receive security error message, then only if a reload with key button f5, I am well redirected to my homepage with no error. More strange, i tried to redirect the user to another page where they are no security error, but then when i press f5 (or send the user via a microflow to the home page) I am redirected to the login page.   It is like I need to get a security error to have my change of role accepted Someone Can help?
3 answers

I’m not sure if I understand this question completely but:

- pressing f5 always takes you to the home page of your application. If you are not logged in, it might be the login page. If you are already logged in, it is the default home page or a role based home page.

- If you change the user role of a user, this user needs to log in again to make this change happen.


I have the same problem from that old question :


But I can’t make it works… How can I easily reload / refresh the current user role? there is obviously a way without login because like I said, with a security error via deeplink, and f5, my current user role is updated and I can go through all my app without login.  (but I want that error to be removed!)

I tried in java to retrieve my session but when i do this : 

    ISession currentMxSession1 = Core.getActiveSession(userName);


I receive null, (with the debug i saw that my session role is set to anonymous, but i set it to user before the java call).



That module solve all my problems :