-
1. Re: Grant roles based on other roles
vk101 Mar 4, 2009 10:47 PM (in response to vk101)When I change identity.addRole to a System.out.println statement for debugging purposes, it never gets run - so the problem is that I'm not sure when these rules get executed. The documentation seems to indicate that this is automatically done only when a permission check is being executed. How could I trigger these checks at any arbitrary time, such as when doing an s:hasRole check?
-
2. Re: Grant roles based on other roles
shane.bryzak Mar 4, 2009 11:34 PM (in response to vk101)How are you inserting Identity into the working memory?
-
3. Re: Grant roles based on other roles
vk101 Mar 4, 2009 11:40 PM (in response to vk101)I actually haven't done anything to insert it - is that the problem? I saw examples elsewhere using Identity(loggedIn == true) and assumed it was naturally there. I'm guessing as documentation says I should use ((RuleBasedIdentity) RuleBasedIdentity.instance()).getSecurityContext().insert(), but where in the code should this go?