incubator-bloodhound-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject svn commit: r1460318 - /incubator/bloodhound/branches/bep_0003_multiproduct/trac/trac/admin/web_ui.py
Date Sun, 24 Mar 2013 11:47:45 GMT
Author: jure
Date: Sun Mar 24 11:47:45 2013
New Revision: 1460318

URL: http://svn.apache.org/r1460318
Log:
#430, forbid access to plugin admin panel in product context, patch t430_r1457691_product_plugin_admin.diff
applied (from Olemis)


Modified:
    incubator/bloodhound/branches/bep_0003_multiproduct/trac/trac/admin/web_ui.py

Modified: incubator/bloodhound/branches/bep_0003_multiproduct/trac/trac/admin/web_ui.py
URL: http://svn.apache.org/viewvc/incubator/bloodhound/branches/bep_0003_multiproduct/trac/trac/admin/web_ui.py?rev=1460318&r1=1460317&r2=1460318&view=diff
==============================================================================
--- incubator/bloodhound/branches/bep_0003_multiproduct/trac/trac/admin/web_ui.py (original)
+++ incubator/bloodhound/branches/bep_0003_multiproduct/trac/trac/admin/web_ui.py Sun Mar
24 11:47:45 2013
@@ -439,10 +439,12 @@ class PluginAdminPanel(Component):
     # IAdminPanelProvider methods
 
     def get_admin_panels(self, req):
-        if 'TRAC_ADMIN' in req.perm:
+        if 'TRAC_ADMIN' in req.perm and not getattr(self.env, 'parent', None):
             yield ('general', _('General'), 'plugin', _('Plugins'))
 
     def render_admin_panel(self, req, cat, page, path_info):
+        if getattr(self.env, 'parent', None):
+            raise PermissionError()
         req.perm.require('TRAC_ADMIN')
 
         if req.method == 'POST':



Mime
View raw message