From: Antony Chazapis Date: Thu, 20 Oct 2011 09:58:22 +0000 (+0300) Subject: Re-enable cookie from shibboleth. X-Git-Tag: pithos/v0.7.9~8^2~10 X-Git-Url: https://code.grnet.gr/git/pithos/commitdiff_plain/c6dad9fecd31f455792acd94596b084783683113?ds=sidebyside Re-enable cookie from shibboleth. --- diff --git a/pithos/im/shibboleth.py b/pithos/im/shibboleth.py index b7800c0..f5e8023 100644 --- a/pithos/im/shibboleth.py +++ b/pithos/im/shibboleth.py @@ -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 diff --git a/pithos/im/views.py b/pithos/im/views.py index f9c8d15..73e5cbf 100644 --- a/pithos/im/views.py +++ b/pithos/im/views.py @@ -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