In digging through the discussions here I've come across two auth methods 
that allow for checking a user's authorization: 

auth.is_logged_in()

and 

auth.has_permission()

These are really useful, but aren't documented in the web2py book (They're 
used a couple of times in other recipes, but they're never explained or 
highlighted.) So I'm wondering (a) whether these could be highlighted in 
the authorization chapter; and (b) whether there are other similar auth 
methods. Does, for example, auth.is_member(auth.user_id) exist to check for 
group membership?

Don't get me wrong, the decorators are great. But sometimes I need 
something more fine-grained for (e.g.) controlling visibility of elements 
in a view on a per-role basis. 

Thanks,

Ian


Reply via email to