Commits

Olemis Lang  committed 1e1d4be

BH Multiproduct #492 : Oops ! Use .child to obtain subproduct resource in target neighborhood

  • Participants
  • Parent commits d298c48
  • Branches t492_product_resources

Comments (0)

Files changed (1)

File t492/t492_r1465566_req_product_perm_v2.diff

 # HG changeset patch
-# Parent 260e0b6d66651215e377aef1863af61f27d6817e
+# Parent bd46ac7972397a1c57e80dd7bfbfb975a130daeb
 BH Multiproduct #492 : Implement req.product_perm in terms of Neighborhoods
 
-diff -r 260e0b6d6665 bloodhound_dashboard/bhdashboard/widgets/product.py
---- a/bloodhound_dashboard/bhdashboard/widgets/product.py	Tue Apr 09 01:39:56 2013 -0500
-+++ b/bloodhound_dashboard/bhdashboard/widgets/product.py	Tue Apr 09 02:28:17 2013 -0500
+diff -r bd46ac797239 bloodhound_dashboard/bhdashboard/widgets/product.py
+--- a/bloodhound_dashboard/bhdashboard/widgets/product.py	Tue Apr 09 02:28:57 2013 -0500
++++ b/bloodhound_dashboard/bhdashboard/widgets/product.py	Tue Apr 09 02:33:49 2013 -0500
 @@ -26,6 +26,7 @@
  
  import itertools
                      for resource in (
                          { 'type': Milestone, 'name': 'milestone', 'hrefurl': True },
                          { 'type': Component, 'name': 'component' },
-diff -r 260e0b6d6665 bloodhound_multiproduct/multiproduct/hooks.py
---- a/bloodhound_multiproduct/multiproduct/hooks.py	Tue Apr 09 01:39:56 2013 -0500
-+++ b/bloodhound_multiproduct/multiproduct/hooks.py	Tue Apr 09 02:28:17 2013 -0500
+diff -r bd46ac797239 bloodhound_multiproduct/multiproduct/hooks.py
+--- a/bloodhound_multiproduct/multiproduct/hooks.py	Tue Apr 09 02:28:57 2013 -0500
++++ b/bloodhound_multiproduct/multiproduct/hooks.py	Tue Apr 09 02:33:49 2013 -0500
 @@ -85,17 +85,6 @@
              self.href = ProductizedHref(self.href, env.href.base)
              self.abs_href = ProductizedHref(self.abs_href, env.abs_href.base)
  
  class ProductRequestFactory(RequestFactoryBase):
      def create_request(self, env, environ, start_response):
-diff -r 260e0b6d6665 bloodhound_multiproduct/multiproduct/web_ui.py
---- a/bloodhound_multiproduct/multiproduct/web_ui.py	Tue Apr 09 01:39:56 2013 -0500
-+++ b/bloodhound_multiproduct/multiproduct/web_ui.py	Tue Apr 09 02:28:17 2013 -0500
+diff -r bd46ac797239 bloodhound_multiproduct/multiproduct/web_ui.py
+--- a/bloodhound_multiproduct/multiproduct/web_ui.py	Tue Apr 09 02:28:57 2013 -0500
++++ b/bloodhound_multiproduct/multiproduct/web_ui.py	Tue Apr 09 02:33:49 2013 -0500
 @@ -26,7 +26,7 @@
  from genshi.core import Attrs, QName
  
          
          if pid is not None:
              add_link(req, 'up', req.href.products(), _('Products'))
-diff -r 260e0b6d6665 bloodhound_theme/bhtheme/theme.py
---- a/bloodhound_theme/bhtheme/theme.py	Tue Apr 09 01:39:56 2013 -0500
-+++ b/bloodhound_theme/bhtheme/theme.py	Tue Apr 09 02:28:17 2013 -0500
+diff -r bd46ac797239 bloodhound_theme/bhtheme/theme.py
+--- a/bloodhound_theme/bhtheme/theme.py	Tue Apr 09 02:28:57 2013 -0500
++++ b/bloodhound_theme/bhtheme/theme.py	Tue Apr 09 02:33:49 2013 -0500
 @@ -27,7 +27,7 @@
  from trac.core import *
  from trac.config import ListOption
          product_list = []
          for product in Product.select(self.env):
 -            if 'PRODUCT_VIEW' in req.product_perm(product.prefix, product.resource):
-+            if 'PRODUCT_VIEW' in req.perm(Neighborhood('product', prefix),
-+                                          product.resource):
++            if 'PRODUCT_VIEW' in req.perm(Neighborhood('product', prefix).
++                                          child(product.resource)):
                  product_list.append((product.prefix, product.name,
                      href_fcn(product.prefix)))
          return product_list