allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tvansteenbu...@apache.org
Subject [1/4] git commit: [#7309] better place to set c.project for nbhd controller
Date Tue, 15 Apr 2014 20:58:48 GMT
Repository: allura
Updated Branches:
  refs/heads/master db776b0b0 -> 914f54841


[#7309] better place to set c.project for nbhd controller


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

Branch: refs/heads/master
Commit: 914f5484131d7d49f76c48587247974bfefc318d
Parents: 138e552
Author: Dave Brondsema <dave@brondsema.net>
Authored: Tue Apr 15 16:48:02 2014 -0400
Committer: Tim Van Steenburgh <tvansteenburgh@gmail.com>
Committed: Tue Apr 15 16:49:38 2014 -0400

----------------------------------------------------------------------
 Allura/allura/controllers/project.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/914f5484/Allura/allura/controllers/project.py
----------------------------------------------------------------------
diff --git a/Allura/allura/controllers/project.py b/Allura/allura/controllers/project.py
index 8452a6e..bf5e227 100644
--- a/Allura/allura/controllers/project.py
+++ b/Allura/allura/controllers/project.py
@@ -81,9 +81,9 @@ class NeighborhoodController(object):
 
     def _check_security(self):
         require_access(self.neighborhood, 'read')
-        # A bit of a hack, but _check_security is best place to set c.project
-        # for this whole controller.  __init__ would be nice, but it gets
-        # clobbered by root.py _setup_request.  This gets run after that.
+
+    def _before(self, *args, **kwargs):
+        # TurboGears runs this before each request
         c.project = self.neighborhood.neighborhood_project
 
     @expose()


Mime
View raw message