ooopsss, sorry
created_by_user=db.company.created_by == db.auth.user.id
*should be :*
created_by_user=db.company.created_by == auth.user <http://db.auth.user.id/>
and it *work just for the query, not for editable and deletable*
for your case please try (the solution is on the book):
def rent():
grid=SQLFORM.grid(db.company, user_signature=False,
*editable = auth.has_permission('edit','auth_user'), *
* deletable = auth.has_permission('delete','auth_user')
*)
return locals()
--
---
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 [email protected].
For more options, visit https://groups.google.com/groups/opt_out.