@auth.requires_membership() was changed so it only does its query when the
decorated function is actually called. However, you are using the more
generic @auth.requires(), which can take any condition. There's no way to
automatically make the evaluation of that condition lazy, so you are
respon
Anthony,
Thanks so much for sharing the expertise, and so quickly.
I had completely misunderstood about the decorators. Actually stacking them
is the simplest and easiest answer, given that it is a valid thing to do.
I hear what you say about the unnecessary database hits and the lambda. I
had
>
> @auth.requires(auth.has_membership('Approver') or
> auth.has_membership('Admin')) #allowing Admin or Approvers to access
The above will execute the has_membership queries every time the controller
is called, even when not accessing the decorated function. To avoid the
unnecessary databa
3 matches
Mail list logo