benlau / gogogohk

Automatically exported from code.google.com/p/gogogohk
0 stars 0 forks source link

Enable Hybrid authentication #51

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Reference:
http://code.google.com/p/app-engine-patch/wiki/GoogleAccounts

Original issue reported on code.google.com by xben...@gmail.com on 16 Sep 2009 at 3:36

GoogleCodeExporter commented 9 years ago

Original comment by mr.ksc...@gmail.com on 17 Sep 2009 at 3:40

GoogleCodeExporter commented 9 years ago
We actually need to differentiate staff and admin ... instead of multiple login 
method.

Original comment by mr.ksc...@gmail.com on 17 Sep 2009 at 3:56

GoogleCodeExporter commented 9 years ago
add AUTH_ADMIN_USER_AS_SUPERUSER = False to settings.py under /gogogo-hk

This turn off "Google Accounts marked as admins get superuser and staff status 
when
logging in for the first time"

now ... @staff_only decorate from ragendja can check for user.is_staff

If, we need to have checking for superuser only, we need further implement
@superuser_only decorater

Original comment by mr.ksc...@gmail.com on 18 Sep 2009 at 2:23