Merge lp:~cjohnston/summit/fix-caching-lp-auth-cookie into lp:summit

Proposed by Chris Johnston
Status: Merged
Approved by: Michael Hall
Approved revision: 536
Merged at revision: 536
Proposed branch: lp:~cjohnston/summit/fix-caching-lp-auth-cookie
Merge into: lp:summit
Diff against target: 36 lines (+9/-2)
2 files modified
summit/schedule/models/summitmodel.py (+1/-1)
summit/settings.py (+8/-1)
To merge this branch: bzr merge lp:~cjohnston/summit/fix-caching-lp-auth-cookie
Reviewer Review Type Date Requested Status
Michael Hall (community) Approve
Review via email: mp+162649@code.launchpad.net

Commit message

Fixes issue where LP is providing cached data by adding the entire cookie string to settings

To post a comment you must log in.
Revision history for this message
Michael Hall (mhall119) wrote :

Looks good

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'summit/schedule/models/summitmodel.py'
2--- summit/schedule/models/summitmodel.py 2013-04-02 12:02:06 +0000
3+++ summit/schedule/models/summitmodel.py 2013-05-06 19:18:22 +0000
4@@ -308,7 +308,7 @@
5 req.add_header("Cache-Control", "no-cache")
6 req.add_header(
7 "Cookie",
8- "lp=%s" % getattr(
9+ "%s" % getattr(
10 settings,
11 "LP_AUTH_COOKIE",
12 "please-don't-cache-me"
13
14=== modified file 'summit/settings.py'
15--- summit/settings.py 2013-05-06 17:16:11 +0000
16+++ summit/settings.py 2013-05-06 19:18:22 +0000
17@@ -22,11 +22,18 @@
18
19 DEBUG = False
20 TEMPLATE_DEBUG = DEBUG
21-
22 SERVE_STATIC = True
23
24 SITE_ROOT = 'http://summit.ubuntu.com'
25
26+"""
27+In order for Summit to authenticate to Launchpad, a cookie must be created
28+The cookie data must then be entered into local_settings.py as LP_AUTH_COOKIE
29+This will be reqired to start with lp=
30+See below for details where XXXXXX would be replaced with the cookie data
31+LP_AUTH_COOKIE = "lp=XXXXXX"
32+"""
33+
34 ADMINS = (
35 #('Your Name', 'admin@example.com'),
36 )

Subscribers

People subscribed via source and target branches