allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brond...@apache.org
Subject git commit: [#7309] better place to set c.project for nbhd controller
Date Tue, 15 Apr 2014 20:48:21 GMT
Repository: allura
Updated Branches:
  refs/heads/db/7309 82228fd07 -> 34788bf1b


[#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/34788bf1
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/34788bf1
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/34788bf1

Branch: refs/heads/db/7309
Commit: 34788bf1b5b84e3c4ca6ed526a5c776689dabc93
Parents: 82228fd
Author: Dave Brondsema <dave@brondsema.net>
Authored: Tue Apr 15 16:48:02 2014 -0400
Committer: Dave Brondsema <dave@brondsema.net>
Committed: Tue Apr 15 16:48:02 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/34788bf1/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