permissions question

45 views
Skip to first unread message

Yoel Benitez Fonseca

unread,
Sep 27, 2019, 3:55:47 PM9/27/19
to web2py
h!

With `auth.accessible_query` u get the rows accessible to a user, how to do the inverse ?

I want to know the users who have a given permission

--
Msc. Yoel Benítez Fonseca






Dave S

unread,
Oct 6, 2019, 6:21:39 PM10/6/19
to web2py-users


On Friday, September 27, 2019 at 12:55:47 PM UTC-7, Yoel Benitez Fonseca wrote:
h!

With `auth.accessible_query` u get the rows accessible to a user, how to do the inverse ?

I want to know the users who have a given permission

Try auth.has_membership(group_id='agents')  , per the examples at 
 
But that seems to be a boolean, so you need a list of users to cycle through. 

More after this pause ...

/dps

Yoel Benitez Fonseca

unread,
Oct 8, 2019, 5:59:53 PM10/8/19
to web2py-users
After a dive in 

gluon/tools.py

And a lot of try and errors this is what i came up to:

Reply all
Reply to author
Forward
0 new messages