Elvelind Grandin <[EMAIL PROTECTED]> writes:

> It would be nice to have something like.
>   @identity.require(group=("groupA", ("groupB", "groupC"))
> 
> where the user would be granted access if he's in groupA Or groubB and C.

Sorry, but what's the difference from that and what I said using lists instead
of tuples:

> On 23 Nov 2005 11:20:01 -0200, Jorge Godoy <[EMAIL PROTECTED]> wrote:

(...)

> > I'd rather have this more transparent as it is now.  Maybe being able to
> > specify multiple values for "group" would do it:
> >
> >         @identity.require(group=["groupA", "groupB"])
> >
> > Then, if any of these is True, grant access, otherwise deny it.  The old
> > syntax for an "AND" could still be used:
> >
> >         @identity.require(group=["groupA", "groupB, groupC"])
> >
> > Here, either the user is in groupA or he's simultaneously in groupB and
> > groupC.

Maybe there's some syntactic advantage that I haven't noticed (like some
benefit from the immutability of tuples). :-) My intention with lists was to
keep the current code and "just add a loop" to check each parameter, stopping
the iteration on the first successful result.

-- 
Jorge Godoy      <[EMAIL PROTECTED]>

Reply via email to