I've created a role (Affiliates) and set some page permission to require that role.
When a user enrolls has an affiliate, I assign him to that role, as such:
RoleManager roleManager = RoleManager.GetManager();
Role role = roleManager.GetRole(
I can see in the back-end that the user is assigned to the role, but he still doesn't have access to restricted page. They don't show up in the navigation and, when going directly to the url, get redirected to the login page.
If I wait a while, then it seems to work. I'm not sure if it's an application restart, because I tried that with no success.
Is this normal? Is there something I am not doing?