Hmm this is very old code... Do you have a "admin" group? and if you do,
are your user a member of this group??

Note : This code shouldn't be used, as you should manipulate user group and
membership with auth.add_group(), auth.add_membership(),
auth.del_membership() and all others auth methods related to user
management. There is many advantages to do so like making sure proper live
variables values get updated properly. Other then that you may require to
logout and login again to force those variables to be updated.


You may consider improving the Bruno's code by replacing SQLFORM() by
proper auth methods.

Thanks

Richard

On Tue, Jun 20, 2017 at 11:13 AM, Maurice Waka <[email protected]>
wrote:

> I tried this code found here
> <http://brunorocha.org/python/web2py/web2py-manage-users-and-membership-in-the-same-form.html>.
> When it comes to logging in, i get an error: Not Authorized, none.
> When using @auth.requires_login(), it works.
> What could I be doing wrong?
> I need to register as admin.
> Kind regards
>
> --
> 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.
>

-- 
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.

Reply via email to