Following the example in the book, I use in db.py-
def give_create_permission(form):
group_id = auth.id_group('user_%s' & auth.user_id)
auth.add_permission(group_id, 'read', db.comment)
auth.settings.register_onaccept = give_create_permission
...but what to do when you also have-
auth.settings.actions_disabled.append('register')
With registration disabled, user accounts are created manually with the
appadmin, so 'register_onaccept' code does not run. Is there way to run
'give_create_permission' when the user logs in the first time, or a way to
check for 'read' permission on db.comment?
Thanks for help,
-J
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.