incubator-bloodhound-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From g..@apache.org
Subject svn commit: r1352505 - in /incubator/bloodhound/trunk/bloodhound_multiproduct/multiproduct: api.py product_admin.py
Date Thu, 21 Jun 2012 11:52:05 GMT
Author: gjm
Date: Thu Jun 21 11:52:04 2012
New Revision: 1352505

URL: http://svn.apache.org/viewvc?rev=1352505&view=rev
Log:
multiproduct: moving permissions to MultiProductSystem - towards #105 (from olemis)

Modified:
    incubator/bloodhound/trunk/bloodhound_multiproduct/multiproduct/api.py
    incubator/bloodhound/trunk/bloodhound_multiproduct/multiproduct/product_admin.py

Modified: incubator/bloodhound/trunk/bloodhound_multiproduct/multiproduct/api.py
URL: http://svn.apache.org/viewvc/incubator/bloodhound/trunk/bloodhound_multiproduct/multiproduct/api.py?rev=1352505&r1=1352504&r2=1352505&view=diff
==============================================================================
--- incubator/bloodhound/trunk/bloodhound_multiproduct/multiproduct/api.py (original)
+++ incubator/bloodhound/trunk/bloodhound_multiproduct/multiproduct/api.py Thu Jun 21 11:52:04
2012
@@ -23,12 +23,14 @@ from pkg_resources import resource_filen
 from trac.core import Component, TracError, implements
 from trac.db import Table, Column, DatabaseManager
 from trac.env import IEnvironmentSetupParticipant
+from trac.perm import IPermissionRequestor
 from trac.web.chrome import ITemplateProvider
 
 class MultiProductSystem(Component):
     """Creates the database tables and template directories"""
     
-    implements(IEnvironmentSetupParticipant, ITemplateProvider)
+    implements(IEnvironmentSetupParticipant, ITemplateProvider,
+            IPermissionRequestor)
     
     SCHEMA = [
         Table('bloodhound_product', key = ['prefix', 'name']) [
@@ -99,3 +101,9 @@ class MultiProductSystem(Component):
         """proved the plugin htdocs"""
         return []
 
+    # IPermissionRequestor methods
+    def get_permission_actions(self):
+        acts = ['PRODUCT_CREATE', 'PRODUCT_DELETE', 'PRODUCT_MODIFY',
+                'PRODUCT_VIEW']
+        return acts + [('PRODUCT_ADMIN', acts)] + [('ROADMAP_ADMIN', acts)]
+

Modified: incubator/bloodhound/trunk/bloodhound_multiproduct/multiproduct/product_admin.py
URL: http://svn.apache.org/viewvc/incubator/bloodhound/trunk/bloodhound_multiproduct/multiproduct/product_admin.py?rev=1352505&r1=1352504&r2=1352505&view=diff
==============================================================================
--- incubator/bloodhound/trunk/bloodhound_multiproduct/multiproduct/product_admin.py (original)
+++ incubator/bloodhound/trunk/bloodhound_multiproduct/multiproduct/product_admin.py Thu Jun
21 11:52:04 2012
@@ -22,7 +22,6 @@ from trac.core import *
 from trac.config import *
 from trac.perm import PermissionSystem
 from trac.admin.api import IAdminPanelProvider
-from trac.perm import IPermissionRequestor
 from trac.ticket.admin import TicketAdminPanel, _save_config
 from trac.resource import ResourceNotFound
 from model import Product
@@ -128,13 +127,3 @@ class ProductAdminPanel(TicketAdminPanel
             data['owners'] = None
         return 'admin_products.html', data
 
-class ProductPermissions(Component):
-    """Product extensions to permissions"""
-    implements(IPermissionRequestor)
-    
-    # IPermissionRequestor methods
-    def get_permission_actions(self):
-        acts = ['PRODUCT_CREATE', 'PRODUCT_DELETE', 'PRODUCT_MODIFY',
-                'PRODUCT_VIEW']
-        return acts + [('PRODUCT_ADMIN', acts)] + [('ROADMAP_ADMIN', acts)]
-



Mime
View raw message