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
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',
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
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
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
5 matches
Mail list logo