[ckan-changes] commit/ckan: 3 new changesets
Bitbucket
commits-noreply at bitbucket.org
Thu Sep 1 11:29:09 UTC 2011
3 new changesets in ckan:
http://bitbucket.org/okfn/ckan/changeset/9cd51409181e/
changeset: 9cd51409181e
branch: feature-78-infinite-cookie-time
user: zephod
date: 2011-09-01 12:53:10
summary: [login][s]: (fixes #78) Fifty year expiry date on login cookies.
affected #: 2 files (306 bytes)
--- a/ckan/controllers/user.py Sat Aug 27 01:15:27 2011 +0100
+++ b/ckan/controllers/user.py Thu Sep 01 11:53:10 2011 +0100
@@ -245,9 +245,12 @@
user_dict = get_action('user_show')(context,data_dict)
- response.set_cookie("ckan_user", user_dict['name'])
- response.set_cookie("ckan_display_name", user_dict['display_name'])
- response.set_cookie("ckan_apikey", user_dict['apikey'])
+ # Max age of cookies: 50 years. Matches time set in templates/user/login.html
+ cookie_timeout=50*365*24*60*60
+
+ response.set_cookie("ckan_user", user_dict['name'], max_age=cookie_timeout)
+ response.set_cookie("ckan_display_name", user_dict['display_name'], max_age=cookie_timeout)
+ response.set_cookie("ckan_apikey", user_dict['apikey'], max_age=cookie_timeout)
h.flash_success(_("Welcome back, %s") % user_dict['display_name'])
h.redirect_to(controller='user', action='me', id=None)
else:
--- a/ckan/templates/user/login.html Sat Aug 27 01:15:27 2011 +0100
+++ b/ckan/templates/user/login.html Thu Sep 01 11:53:10 2011 +0100
@@ -42,6 +42,8 @@
<br/><label for="password">Password:</label><input type="password" name="password" value="" />
+ <!-- 50 year timeout -->
+ <input type="hidden" name="remember" value="1576800000" /><br/></fieldset>
${h.submit('s', _('Login'))} —
http://bitbucket.org/okfn/ckan/changeset/09e8611e84b8/
changeset: 09e8611e84b8
branch: feature-78-infinite-cookie-time
user: zephod
date: 2011-09-01 13:26:18
summary: [close-branch]:
affected #: 0 files (0 bytes)
http://bitbucket.org/okfn/ckan/changeset/8638a0ac2255/
changeset: 8638a0ac2255
user: rgrp
date: 2011-09-01 13:28:48
summary: [merge,from-branch][s]: merge completed feature-78 branch.
affected #: 2 files (306 bytes)
--- a/ckan/controllers/user.py Sat Aug 27 01:15:27 2011 +0100
+++ b/ckan/controllers/user.py Thu Sep 01 12:28:48 2011 +0100
@@ -245,9 +245,12 @@
user_dict = get_action('user_show')(context,data_dict)
- response.set_cookie("ckan_user", user_dict['name'])
- response.set_cookie("ckan_display_name", user_dict['display_name'])
- response.set_cookie("ckan_apikey", user_dict['apikey'])
+ # Max age of cookies: 50 years. Matches time set in templates/user/login.html
+ cookie_timeout=50*365*24*60*60
+
+ response.set_cookie("ckan_user", user_dict['name'], max_age=cookie_timeout)
+ response.set_cookie("ckan_display_name", user_dict['display_name'], max_age=cookie_timeout)
+ response.set_cookie("ckan_apikey", user_dict['apikey'], max_age=cookie_timeout)
h.flash_success(_("Welcome back, %s") % user_dict['display_name'])
h.redirect_to(controller='user', action='me', id=None)
else:
--- a/ckan/templates/user/login.html Sat Aug 27 01:15:27 2011 +0100
+++ b/ckan/templates/user/login.html Thu Sep 01 12:28:48 2011 +0100
@@ -42,6 +42,8 @@
<br/><label for="password">Password:</label><input type="password" name="password" value="" />
+ <!-- 50 year timeout -->
+ <input type="hidden" name="remember" value="1576800000" /><br/></fieldset>
${h.submit('s', _('Login'))} —
Repository URL: https://bitbucket.org/okfn/ckan/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
More information about the ckan-changes
mailing list