Simone, I don't understand why you say you cached groups, from what you showed you only prevent accessing db until the very end with the lambda no?
Richard On Fri, Nov 11, 2016 at 8:16 AM, Niphlod <[email protected]> wrote: > any and all are definitely python syntax. > > I do this using the cached groups, so I don't reach the db for every check > > > ALLOWED = set(('admin', 'contributor')) > @auth.requires(lambda: auth.user_id and ALLOWED & set(auth.user_groups. > values())) > > > > On Friday, November 11, 2016 at 1:55:25 PM UTC+1, 黄祥 wrote: >> >> i'm interested in *ANY* and *ALL* in your code, but can't find anything >> that contain *ANY* or *ALL* on the link you provide, is it DAL, web2py >> or python syntax? >> >> best regards, >> stifan >> > -- > Resources: > - http://web2py.com > - http://web2py.com/book (Documentation) > - http://github.com/web2py/web2py (Source code) > - https://code.google.com/p/web2py/issues/list (Report Issues) > --- > You received this message because you are subscribed to the Google Groups > "web2py-users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.

