Merge lp:~cbjchen/horizon/lp1382079 into lp:~ubuntu-server-dev/horizon/kilo

Proposed by Liang Chen
Status: Merged
Merge reported by: Michael Hudson-Doyle
Merged at revision: not available
Proposed branch: lp:~cbjchen/horizon/lp1382079
Merge into: lp:~ubuntu-server-dev/horizon/kilo
Diff against target: 69 lines (+49/-0)
3 files modified
debian/changelog (+8/-0)
debian/patches/fix-project-selector.patch (+40/-0)
debian/patches/series (+1/-0)
To merge this branch: bzr merge lp:~cbjchen/horizon/lp1382079
Reviewer Review Type Date Requested Status
Ubuntu Server Developers Pending
Review via email: mp+289023@code.launchpad.net

Description of the change

SRU for bug 1382079

To post a comment you must log in.
Revision history for this message
Corey Bryant (corey.bryant) wrote :

Liang, I'm sorry. I cherry-picked the patch from your gerritt review without having seen this bzr merge proposal. Nonetheless the fix has been uploaded to kilo-staging in the UCA.

Revision history for this message
Liang Chen (cbjchen) wrote :

Corey, that's alright as long as the fix is brought in. Thank you!

Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

Marking branch as merged to get it off sponsorship report.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2015-10-20 15:04:47 +0000
3+++ debian/changelog 2016-03-15 08:56:23 +0000
4@@ -1,3 +1,11 @@
5+horizon (1:2015.1.2-0ubuntu2) vivid; urgency=medium
6+
7+ * Remove session caching of can_access to fix project selector problem
8+ (LP: #1382079):
9+ - d/p/fix-project-selector.patch
10+
11+ -- Liang Chen <liang.chen@canonical.com> Tue, 15 Mar 2016 06:52:19 +0000
12+
13 horizon (1:2015.1.2-0ubuntu1) vivid; urgency=medium
14
15 [ Chuck Short ]
16
17=== added file 'debian/patches/fix-project-selector.patch'
18--- debian/patches/fix-project-selector.patch 1970-01-01 00:00:00 +0000
19+++ debian/patches/fix-project-selector.patch 2016-03-15 08:56:23 +0000
20@@ -0,0 +1,40 @@
21+From b9570d7c12930342a2d1bb70cbce611892a76512 Mon Sep 17 00:00:00 2001
22+From: lin-hua-cheng <os.lcheng@gmail.com>
23+Date: Tue, 15 Sep 2015 16:19:25 -0700
24+Subject: [PATCH] Remove session caching of can_access call results
25+
26+Partial revert of commit 16db58fabad8934b8fbdfc6aee0361cc138b20af
27+
28+Change-Id: I7b80a94117310c92f9eb83541c8d75e2bf638b90
29+Closes-Bug: #1450963
30+Closes-Bug: #1382079
31+(cherry picked from commit fa746811e49b867d4995ab97c6709bdcfca1eb0b)
32+---
33+
34+diff --git a/horizon/base.py b/horizon/base.py
35+index 61f944f..2f445b3 100644
36+--- a/horizon/base.py
37++++ b/horizon/base.py
38+@@ -56,6 +56,10 @@
39+ _decorate_urlconf(pattern.url_patterns, decorator, *args, **kwargs)
40+
41+
42++# FIXME(lhcheng): We need to find a better way to cache the result.
43++# Rather than storing it in the session, we could leverage the Django
44++# session. Currently, thTs has been causing issue with cookie backend,
45++# adding 1600+ in the cookie size.
46+ def access_cached(func):
47+ def inner(self, context):
48+ session = context['request'].session
49+@@ -107,7 +111,10 @@
50+ urlpatterns = patterns('')
51+ return urlpatterns
52+
53+- @access_cached
54++ # FIXME(lhcheng): Removed the access_cached decorator for now until
55++ # a better implementation has been figured out. This has been causing
56++ # issue with cookie backend, adding 1600+ in the cookie size.
57++ # @access_cached
58+ def can_access(self, context):
59+ """Return whether the user has role based access to this component.
60+
61
62=== modified file 'debian/patches/series'
63--- debian/patches/series 2015-04-14 13:58:47 +0000
64+++ debian/patches/series 2016-03-15 08:56:23 +0000
65@@ -3,3 +3,4 @@
66 ubuntu_settings.patch
67 embedded-xstatic.patch
68 add-juju-environment-download.patch
69+fix-project-selector.patch

Subscribers

People subscribed via source and target branches