Re: [web2py] Re: Permissions on records

2010-09-08 Thread Johann Spies
Thanks. That brings some light. I was trying to fit it into a controller. Regards Johann --     "Be not deceived; God is not mocked: for whatsoever a      man soweth, that shall he also reap."                                   Galatians 6:7

Re: [web2py] Re: Permissions on records

2010-09-07 Thread Johann Spies
Maybe I should rephrase my lack of understanding. Can you explain the example from the book: = def give_create_permission(form): group_id = auth.id_group('user_%s' % auth.user.id) auth.add_permission(group_id, 'read', db.comment) auth.add_permission(group_id, 'create',

Re: [web2py] Re: Permissions on records

2010-09-07 Thread Johann Spies
Thanks for your answer. I am trying to understand. On 7 September 2010 16:48, mdipierro wrote: > It is a logic issue. ... > You do not want to register the callback with "register_onaccept". you > want to set these once for all: > >       auth.add_permission(group_id, 'read', table) >       auth

Re: [web2py] Re: Permissions on records

2010-09-07 Thread Johann Spies
Is there anyone who can help me with this one please? Regards Johann --     "Be not deceived; God is not mocked: for whatsoever a      man soweth, that shall he also reap."                                   Galatians 6:7

Re: [web2py] Re: Permissions on records

2010-09-06 Thread Johann Spies
On 29 August 2010 07:05, mdipierro wrote: > almost: > > def give_create_permission(form,table): >        group_id = auth.id_group('user_%s' % auth.user.id) >        auth.add_permission(group_id, 'read', table) > > and > > auth.settings.register_onaccept = (lambda form, > table=table:give_create_pe