[web2py] Re: how to disable field access if not authorized

2010-02-07 Thread weheh
It's possible, but according to MDB, that would result in crud.update turning into crud.create. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send

[web2py] Re: how to disable field access if not authorized

2010-02-07 Thread mdipierro
I am not sure non-writable fields have widgets. I will check. Most likely they do not if they are not writable and not readable. On Feb 7, 2:02 am, weheh richard_gor...@verizon.net wrote: I'm using crud and want to disable access to certain fields if user is not a member of the admin group. For

[web2py] Re: how to disable field access if not authorized

2010-02-07 Thread weheh
These are readable, but not writable. What I want is for widget to get grayed-out and not be usable when user doesn't have permission to fill in the field. On Feb 7, 4:24 am, mdipierro mdipie...@cs.depaul.edu wrote: I am not sure non-writable fields have widgets. I will check. Most likely they

[web2py] Re: how to disable field access if not authorized

2010-02-07 Thread weheh
These are readable, but not writable. What I want is for widget to get grayed-out and not be usable when user doesn't have permission to fill in the field. Ideally, I think it would make sense to be able to do this as a requirement to a field, something like:

Re: [web2py] Re: how to disable field access if not authorized

2010-02-07 Thread Jonathan Lundell
On Feb 7, 2010, at 7:32 AM, weheh wrote: These are readable, but not writable. What I want is for widget to get grayed-out and not be usable when user doesn't have permission to fill in the field. Ideally, I think it would make sense to be able to do this as a requirement to a field,

[web2py] Re: how to disable field access if not authorized

2010-02-07 Thread mdipierro
You can do what you say Field(...,writable = auth.has_permission('whatever')) The problem seems to be that {{=form.custom.widget.field}} fails for you when db.table.field.writable is False. It seems to work for me: db.define_table('test',Field('name')) db.test.name.writable=False