> 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>'))

> let me know if it works!

thx, now it is working like a charm ;)

one change needed though if someone find this thread later:
>if not auth.has_permission(auth.user_group(auth.user.id), 'create','my_table'):
should be:
>if not auth.has_permission( 'create','my_table',auth.user_group(auth.user.id)):
( http://web2py.com/book/default/chapter/08 )

Reply via email to