Re-enable cookie from shibboleth.
authorAntony Chazapis <chazapis@gmail.com>
Thu, 20 Oct 2011 09:58:22 +0000 (12:58 +0300)
committerAntony Chazapis <chazapis@gmail.com>
Thu, 20 Oct 2011 09:58:22 +0000 (12:58 +0300)
pithos/im/shibboleth.py
pithos/im/views.py

index b7800c0..f5e8023 100644 (file)
@@ -107,8 +107,8 @@ def login(request):
     
     response = HttpResponse()
     # TODO: Cookie should only be set at the client side...
-    #expire_fmt = user.auth_token_expires.strftime('%a, %d-%b-%Y %H:%M:%S %Z')
-    #response.set_cookie('X-Auth-Token', value=user.auth_token, expires=expire_fmt, path='/')
+    expire_fmt = user.auth_token_expires.strftime('%a, %d-%b-%Y %H:%M:%S %Z')
+    response.set_cookie('X-Auth-Token', value=user.auth_token, expires=expire_fmt, path='/')
     if not next:
         response['X-Auth-User'] = user.uniq
         response['X-Auth-Token'] = user.auth_token
index f9c8d15..73e5cbf 100644 (file)
@@ -68,9 +68,8 @@ def requires_admin(func):
 
 
 def index(request):
-    stats = {}
-    stats['users'] = User.objects.count()
-    return render_response('index.html', tab='home', stats=stats)
+    # TODO: Get and pass on next variable.
+    return render_response('index.html')
 
 
 @requires_admin