Hi,
there is a bug in documentation,
http://web2py.com/book/default/chapter/08#Authorization
rows = db(accessible_query('read', db.mytable, user_id))\
.select(db.mytable.ALL)
should be:
rows = db(auth.accessible_query('read', db.mytable, user_id))\
.select(db.mytable.ALL)
Also, I noticed that accessible_query raises an exception if user is
not logged in.
It's because of a line 2805 (trunk) in gluon/tools.py:
user_id = self.user.id
What is expected behavior if user is not logged in? Is this
intentional?