1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-26 15:26:19 +00:00

Using ccnet EmailUser table instead of seahub auth_user table.

* Rewrite auth module, change user to emailuser.
* Remove site app, and remove EmailOrUsernameModelBackend.
This commit is contained in:
xiez
2012-04-11 19:48:20 +08:00
parent 0ccd1ea981
commit 8c9a5084e6
19 changed files with 296 additions and 189 deletions

View File

@@ -5,7 +5,7 @@ from django.core.exceptions import ImproperlyConfigured
class LazyUser(object):
def __get__(self, request, obj_type=None):
if not hasattr(request, '_cached_user'):
from django.contrib.auth import get_user
from auth import get_user
request._cached_user = get_user(request)
return request._cached_user