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

Subscribers

People subscribed via source and target branches