You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by tv...@apache.org on 2013/06/25 15:37:58 UTC

[3/3] git commit: [#6324] Reduce unnecessary project cache clearing on new projects

[#6324] Reduce unnecessary project cache clearing on new projects

Signed-off-by: Cory Johns <cj...@slashdotmedia.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/e2bb7716
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/e2bb7716
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/e2bb7716

Branch: refs/heads/master
Commit: e2bb7716edfc71f1084cabe10b859e0181187252
Parents: a144608
Author: Cory Johns <cj...@slashdotmedia.com>
Authored: Wed Jun 19 18:38:06 2013 +0000
Committer: Tim Van Steenburgh <tv...@gmail.com>
Committed: Tue Jun 25 13:37:29 2013 +0000

----------------------------------------------------------------------
 Allura/allura/lib/plugin.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/e2bb7716/Allura/allura/lib/plugin.py
----------------------------------------------------------------------
diff --git a/Allura/allura/lib/plugin.py b/Allura/allura/lib/plugin.py
index 0d104f5..855e71c 100644
--- a/Allura/allura/lib/plugin.py
+++ b/Allura/allura/lib/plugin.py
@@ -576,7 +576,8 @@ class ProjectRegistrationProvider(object):
 
         # clear the RoleCache for the user so this project will
         # be picked up by user.my_projects()
-        g.credentials.clear_user(user._id, '*')
+        g.credentials.clear_user(user._id, None)  # unnamed roles for this user
+        g.credentials.clear_user(user._id, p._id)  # named roles for this project + user
         with h.push_config(c, project=p, user=user):
             ThreadLocalORMSession.flush_all()
             # have to add user to context, since this may occur inside auth code