The book says 'db(accessible_query(...)...' -- should it say 'db(auth.
accessible_query(...)...'?
http://web2py.com/book/default/chapter/08?search=accessible_query
On Friday, March 18, 2011 4:08:18 PM UTC-4, Massimo Di Pierro wrote:
> If you have given explicit permission to the group:
>
> group_id=auth.add_group('Super Admin')
> auth.add_permission(group_id, 'read', db.mytable)
>
> then you can do:
>
> for row in db(auth.accessible_query('read',
> db.mytable)).select(db.mytable.ALL): print row
>
> in the case being discussed mytable is auth_user
>
> On Mar 18, 2:38 pm, Tom Atkins <[email protected]> wrote:
> > Thank you - yes the double hit on the database was what made it seem
> > inelegant to me.
> >
> > Your joined query works fine and I can work with the return data. Any
> > further improvements gratefully received! Hoping Massimo has an
> undocumented
> > super 1 liner! ;-)