-
1. Re: Extending Identity
braga Apr 29, 2008 7:04 PM (in response to lcurros)Hi Leo,
Try this:
... private RuleBase securityRules; public void setSecurityRules(RuleBase securityRules) { this.securityRules = securityRules; } ...
-
2. Re: Extending Identity
shane.bryzak Apr 30, 2008 1:52 AM (in response to lcurros)If you still want to use rule-based permissions, you need to extend RuleBasedIdentity instead of Identity.
-
3. Re: Extending Identity
lcurros Apr 30, 2008 8:46 AM (in response to lcurros)Thanks for your answers.
Both work correctly.But I would like to know what are the benefits of rule-based permissions?
-
4. Re: Extending Identity
shane.bryzak Apr 30, 2008 9:34 AM (in response to lcurros)The benefit is that you can have complex permissions based on business logic. Rule based-security uses Drools under the covers which gives you a great deal of control over how permissions are granted.
-
5. Re: Extending Identity
alceu Aug 5, 2009 9:18 PM (in response to lcurros)Hi, Leo C.
I'm trying to set userId in a CustomIdentity too, but any class that I try to inject in my CustomIdentity to retrive for me the userId by the principal name is coming null. Can you show with code how did you set the userId of the logged user? I'm using JpaIdentityStore.
Thanks in advance.
-
6. Re: Extending Identity
lcurros Aug 5, 2009 11:20 PM (in response to lcurros)yes, as I remember, you cant inject it because of @bypassinterceptors
I just call setter (setUserId) from authenticator method to set itHope this helps!