seam中使用drools问题
wan_2004
2008-10-28
我的规则
rule "acl test" no-loop activation-group "permissions" when user : User() c : PermissionCheck(name=="aclTest",action=="aclTest",granted==false) eval(user.getName().equals("attr")) then c.grant(); end 这个怎么也不能验证成功包括下面这个 rule "acl test" no-loop activation-group "permissions" when User(name=="attr") c : PermissionCheck(name=="aclTest",action=="aclTest",granted==false) then c.grant(); end 不知道怎么回事,我所有条件的匹配了就是不能执行 |
|
wan_2004
2008-10-28
解决了
原来使用的时候要把环境变量的User传进去 用@Restrict("#{s:hasPermission('aclTest','aclTest',user)}") user就是我在代码里@In进来的User |