allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tvansteenbu...@apache.org
Subject git commit: [#6709] Remove Anonymous user caching
Date Wed, 25 Sep 2013 17:30:41 GMT
Updated Branches:
  refs/heads/tv/6709 340c6cb02 -> 1be23969e


[#6709] Remove Anonymous user caching

- Turns out this breaks allura.tests.functional.test_admin:TestExport.test_access,
  so reverting for now.

Signed-off-by: Tim Van Steenburgh <tvansteenburgh@gmail.com>


Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/1be23969
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/1be23969
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/1be23969

Branch: refs/heads/tv/6709
Commit: 1be23969e4e94eb49a8d1ddfbc6d9e619fa1254c
Parents: 340c6cb
Author: Tim Van Steenburgh <tvansteenburgh@gmail.com>
Authored: Wed Sep 25 17:30:27 2013 +0000
Committer: Tim Van Steenburgh <tvansteenburgh@gmail.com>
Committed: Wed Sep 25 17:30:27 2013 +0000

----------------------------------------------------------------------
 Allura/allura/model/auth.py | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/1be23969/Allura/allura/model/auth.py
----------------------------------------------------------------------
diff --git a/Allura/allura/model/auth.py b/Allura/allura/model/auth.py
index 627a703..cb15398 100644
--- a/Allura/allura/model/auth.py
+++ b/Allura/allura/model/auth.py
@@ -682,9 +682,7 @@ class User(MappedClass, ActivityNode, ActivityObject):
 
     @classmethod
     def anonymous(cls):
-        if not hasattr(cls, '_anon_user'):
-            cls._anon_user = User.query.get(_id=None)
-        return cls._anon_user
+        return User.query.get(_id=None)
 
     def email_address_header(self):
         h = header.Header()
@@ -729,7 +727,7 @@ class ProjectRole(MappedClass):
         unique_indexes = [ ('user_id', 'project_id', 'name') ]
         indexes = [
             ('user_id',),
-            ('project_id', 'name'),
+            ('project_id', 'name'), # used in ProjectRole.by_name()
             ('roles',),
             ]
 


Mime
View raw message