After a long investigation I found that , hasPermission is limitted to 3 parameters (name,action,target) - in target I can pass only one arg(not var args)
Identity:hasPermissions has var args feature but , it's not working.
I did't find any additional advantages , it's simple to write my permissions api in java/groovy
Unfortunately I did't found much docs to explain this. For beginners it will be much difficult to understand.
I hope there will me more features on this area in the next releases of Seam.
That too I totally confused with seamspace sample application.It's security rules are in draft (most of them are not implemented)
(only google cached version is available)
Finally I got it..
i did a mistake ..
drools got user account into it's working memory , we can directly
rule UserChitchatCheck no-loop activation-group "permissions" when u: User() //Chitchat(u2:user) Chitchat(user.id == u.id) check: PermissionCheck(action == "cdelete") // Role(name == "user") then //System.out.println("cdelete:"+n); //System.out.println("cdelete:"+u.id+"-"+u2.id); check.grant(); end
I agree, drools is simple
if u know:)