This would be my recommendation:

1) Use the username and not the email for login

auth.define_tables(username=True)

2) add a flag to determine who is admin

auth.settings.extra_fields['auth_user'] = 
[Field('is_admin','boolean',default=False,writable=False)]

3) decorate your actions that require admin access

@auth.requires(lambda: auth.user and auth.user.is_admin)

4) Use appadmin to set is_admin permissions.

On Tuesday, 20 May 2014 02:03:13 UTC-5, [email protected] wrote:
>
> Heylo :) , i want to ask something.. i got a problem..how i can create a 
>  different login for user and admin? Plz others help me :)  I develop 
> system for my degree thesis ...
>

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