Author: gjm
Date: Fri Nov 2 14:01:33 2012
New Revision: 1404964
URL: http://svn.apache.org/viewvc?rev=1404964&view=rev
Log:
adjust permission checking on product views to respect PRODUCT_VIEW on a per
resource basis - towards #249
Modified:
incubator/bloodhound/trunk/bloodhound_multiproduct/multiproduct/web_ui.py
Modified:
incubator/bloodhound/trunk/bloodhound_multiproduct/multiproduct/web_ui.py
URL:
http://svn.apache.org/viewvc/incubator/bloodhound/trunk/bloodhound_multiproduct/multiproduct/web_ui.py?rev=1404964&r1=1404963&r2=1404964&view=diff
==============================================================================
--- incubator/bloodhound/trunk/bloodhound_multiproduct/multiproduct/web_ui.py
(original)
+++ incubator/bloodhound/trunk/bloodhound_multiproduct/multiproduct/web_ui.py
Fri Nov 2 14:01:33 2012
@@ -137,6 +137,8 @@ class ProductModule(Component):
req.perm.require('PRODUCT_VIEW')
pid = req.args.get('productid', None)
+ if pid:
+ req.perm('product', pid).require('PRODUCT_VIEW')
action = req.args.get('action', 'view')
products = [p for p in Product.select(self.env)