Can you just change the writable value in your controller based on who is
logged in? Works in all of my situations like you describe.
if auth.user.id in (users_that_cannot_edit_this_field):
db.table_name.field_name.writable = False
Not sure how you decide who can edit the field, but I would think this
would work. It has to appear before you create the form in the controller.
Am I understanding the question correctly?
-Jim
On Thursday, December 26, 2013 8:21:20 AM UTC-6, Phil Hughes wrote:
>
> I see this as related to a thread about changing which fields are
> displayed but my need is slightly different. I want to display all the form
> fields but, depending on who is seeing it, change which fields can be
> edited. While there is a lot more in the record, basically allow a user to
> only update "their" fields.
>
> The record is about a transaction (involving Bitcoin) and two parties are
> involved. So, for example, the person who is to receive the payment could
> change their bitcoin address but the other party could not.
>
--
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 [email protected].
For more options, visit https://groups.google.com/groups/opt_out.