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 web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.