[rules-users] inconsistency with 'collect' and the '||' operator

Edson Tirelli tirelli at post.com
Wed Nov 7 14:54:57 EST 2007


   Your message seems to be truncated.
   Can you please re-send?

   []s
   Edson

2007/11/7, Adrian Cowham <adrian.cowham at gmail.com>:
>
> I'm running into an issue where the || operator embedded in a collect CE
> isn't working as expected. The rule I have is
>
> rule Grant Access"
>     when
>         $request : AccessRequest($name : username, $ID : sessionID, $loc :
> accessLocation, $day : dayOfAccess)
>         $user : NetworkUser(username == $name)
>         $group : UserGroup(users contains $user)
>         $locationRules : ArrayList(size > 0) from
>             collect (AccessRule((allowedLocation == "ANY" ||
> allowedLocation == $loc), allowAccess == "false")
>             from $group.getRules())
>     then
>         # access granted
>
> end
>
>
> The issue I'm having is with AccessRule((allowedLocation == "ANY" ||
> allowedLocation == $loc), allowAccess == "false"), this translate to "all
> access rules that have the allowed location set to ANY or set to the
> location the user is logging in from". I created a UserGroup named "
> super.users" that contains a user named "root" and a single rule that
> allows access from ANY location. However, when I simulate a login with
> "root"
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
>


-- 
  Edson Tirelli
  Software Engineer - JBoss Rules Core Developer
  Office: +55 11 3529-6000
  Mobile: +55 11 9287-5646
  JBoss, a division of Red Hat @ www.jboss.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20071107/5f50df25/attachment.html 


More information about the rules-users mailing list