db.sometable.somefield.writable==True

should work for SQLTABLE too. Does it not?

Massimo

On Mar 15, 12:29 am, phneoix <neo.stea...@gmail.com> wrote:
> thanks a lot mdipierro, column privileges working quite nicely.
>
> is there any similar method for SQLTABLE whereby only columns with
> readonly privileges are displayed.
>
> thanks
>
> On Mar 9, 6:36 pm, mdipierro <mdipie...@cs.depaul.edu> wrote:
>
> > SQLFORM(db.sometable)
>
> > only displays somefield IF db.sometable.somefield.writable==True
>
> > and
>
> > SQLFORM(db.sometable, readonly=True)
>
> > only displays somefield IF db.sometable.somefield.readable==True
>
> > On Mar 9, 3:16 am, David Marko <dma...@tiscali.cz> wrote:
>
> > > Its very usefull feature. Does it mean that field is not generate
> > > using SQLFORM only or its not saved even when user submit this field
> > > to server in any(spoof) way?
>
> > > David
>
> > > On 9 Bře, 04:58, mdipierro <mdipie...@cs.depaul.edu> wrote:
>
> > > > yes. for example:
>
> > > > # use the new group based authenticaion
> > > > auth=Auth(globals(),db)
>
> > > > # create a group
> > > > gid=auth.add_group('administrator')
>
> > > > # chose a user, for example the user logged in
> > > > uid=auth.user.id
>
> > > > # make the user member of the group
> > > > auth.add_membership(gid, pid)
>
> > > > # give members of the group a certain permission, let's call it
> > > > "edit_somefield" on db.sometable
> > > > auth.add_perimission(gid,"edit_somefield", db.sometable)
>
> > > > # explain web2py what "edit_somefield" mean
> > > > db.sometable.somefield.writable=auth.has_permission
> > > > ("edit_somefield",db.sometable)
>
> > > > Hope this helps. I wish I had time to document this better. Hopefully
> > > > in a couple of weeks.
>
> > > > Massimo
>
> > > > On Mar 8, 9:01 pm, phneoix <neo.stea...@gmail.com> wrote:
>
> > > > > hi,
> > > > > i would like to know to know whether it is possibe to control the
> > > > > column access for users. i am having multiple users accessing the same
> > > > > table where i need to control the column access individually for each
> > > > > user and generate the forms automatically based on the column
> > > > > priviliges. is there any way to achieve this in web2py.
>
> > > > > thanks
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to