1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-01 23:20:51 +00:00

Use email-user and binding in ccnet instead of userprofile in seahub

* Remove UserProfile from profile/models.
* Disable ccnet user id binding in profile page
This commit is contained in:
xiez
2012-04-01 21:55:33 +08:00
parent fc11ef20cb
commit 50fe2bb91a
12 changed files with 104 additions and 95 deletions

View File

@@ -1,5 +1,4 @@
from seahub.profile.models import UserProfile
from seaserv import ccnet_rpc
class UseridMiddleware(object):
"""Store ccnet user id in request.user.user_id"""
@@ -9,9 +8,8 @@ class UseridMiddleware(object):
return None
try:
profile = request.user.get_profile()
request.user.user_id = profile.ccnet_user_id
except UserProfile.DoesNotExist:
request.user.user_id = ccnet_rpc.get_binding_userid(request.user.username)
except:
request.user.user_id = ''
return None