Web2py registration of a second user verified by the first user

33 views
Skip to first unread message

Aydin

unread,
Jan 16, 2020, 8:49:47 AM1/16/20
to web2py-users
In my web2py app, I want to allow members that have the same key access the same information. The first user uses a key to register (key added to the Auth_user) and no verification is needed. Now, when the second user wants to sign up and uses the same key, I want an email to be sent to the first user and the first user verifies this registration. What's the easiest way to do this? By the way, I still use the email approval link for both first and second users to verify their emails.

Dave S

unread,
Jan 16, 2020, 5:05:32 PM1/16/20
to web2py-users


On Thursday, January 16, 2020 at 5:49:47 AM UTC-8, Aydin wrote:
In my web2py app, I want to allow members that have the same key access the same information. The first user uses a key to register (key added to the Auth_user) and no verification is needed. Now, when the second user wants to sign up and uses the same key, I want an email to be sent to the first user and the first user verifies this registration. What's the easiest way to do this? By the way, I still use the email approval link for both first and second users to verify their emails.

I would look at using groups for that.  The first user would create the group (as a side effect of registering the key), and you'd set the First User to be able approve additions to the group.

See auth.add_group() and auth.add_permission() in
<URL:http://www.web2py.com/books/default/chapter/29/09/access-control#Authorization>
in the section before "Decorators".

/dps

Aydin

unread,
Jan 16, 2020, 6:57:44 PM1/16/20
to web2py-users
Thanks for the reply. I will update this on the path I chose.
Reply all
Reply to author
Forward
0 new messages