Kuba,
you are right, sadly it does not... ;-)
a solution can be putting a new action similar to the following in the
controller:
@auth.requires_login()
def onlogin_add_permission():
if not auth.has_permission(auth.user_group(auth.user.id), 'create',
'my_table'):
auth.add_permission(auth.user_group(auth.user.id),'create','my_table')
redirect(URL('<put default landing page here>'))
then in the model:
auth.settings.login_next=URL('onlogin_add_permission')
let me know if it works!
mic
2010/11/23 Kuba Kucharski <[email protected]>:
>> does the following work for you?
>>
>> ----
>>
>> def onlogin_add_permission():
>> if not auth.has_permission(auth.user_group(form.vars.id), 'create',
>> 'my_table'):
>> auth.add_permission(auth.user_group(form.vars.id),'create','my_table')
>>
>>
>> auth.settings.login_onaccept = onlogin_add_permission
>
> very weird thing. looks like onlogin_add_permission() is never
> executed. does this work for YOU?
>