Re: [web2py] Re: @auth.requires for functions

2017-04-20 Thread Andrea Fae'
Thanks Il giorno giovedì 20 aprile 2017 15:40:33 UTC+2, Marvix ha scritto: > > https://docs.python.org/2/library/functions.html#any > > def any(iterable): > for element in iterable: > if element: > return True > return False > > so any() return true if one (or more) of

Re: [web2py] Re: @auth.requires for functions

2017-04-20 Thread Marvi Benedet
https://docs.python.org/2/library/functions.html#any def any(iterable): for element in iterable: if element: return True return False so any() return true if one (or more) of the elements is True. this: auth.has_membership(role) for role in list_of_roles try all th