is there a way to make create authorization conditional depending on 
whether user has membership in db.auth_membership table?

I'm trying to write something analogous to:

    is_owner = (lambda row: row.Taxonomy.created_by == auth.user_id) if 
auth.user else False
    grid = SQLFORM.grid(query, editable=is_owner)

So I tried

    is_manager = (lambda: ((auth.user_id == db.auth_membership.user_id) & 
(db.auth_membership.group_id == 'admin'))) if auth.user else False  
    grid = SQLFORM.grid(query, create=is_manager)

create = with anything besides True or False, doesn't work

thanks,

Alex Glaros

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to