You could create a kind of user_table_access_profile mechanism for each
table. You start by setting every fields to readable and writable false
then base on a user authentified you can switch field to true base on a
user_table_access_profile.

There is plenty of data structure you can use to store the
user_table_access_profile, but you need to have access_profile for each
role for the C-R-U from CRUD at least. In case of more fancy form you can
manage exception in the controller with readable writable. Once you have a
user_table_access_profile var you can control the field diplayed updated
very easily with a for loop... And you stop having many repetitive code in
controller just to return a different form a given user/group.

Richard


On Tue, Sep 3, 2013 at 1:17 PM, António Ramos <[email protected]> wrote:

> auth !!
>
>
> 2013/9/3 António Ramos <[email protected]>
>
>> I have to include them in the field list because i have another line of
>> code to detect it
>> if aut.has_membership('admin')
>>
>> show the field and allow it to be edited
>>
>> else
>> Dont show the field( this is where i have the problem.
>>
>>
>>
>>
>> 2013/9/3 Vinicius Assef <[email protected]>
>>
>>> On Tue, Sep 3, 2013 at 1:55 PM, António Ramos <[email protected]>
>>> wrote:
>>> >
>>> > I want to hide the field  in the form
>>>
>>> So, don't include its name in fields list.
>>>
>>> --
>>>
>>> ---
>>> 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.
>>>
>>
>>
>  --
>
> ---
> 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.
>

-- 

--- 
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.

Reply via email to