[Mpuls-commits] r5515 - in wasko/trunk/waskoweb: controllers templates/casemanagement

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Tue Nov 1 14:25:16 CET 2011


Author: ludwig
Date: 2011-11-01 14:25:16 +0100 (Tue, 01 Nov 2011)
New Revision: 5515

Modified:
   wasko/trunk/waskoweb/controllers/case.py
   wasko/trunk/waskoweb/controllers/settings.py
   wasko/trunk/waskoweb/templates/casemanagement/main.mako
Log:
Issue 2402: Renaming of old roles.
Rename: admin_ka->admin, cm_ka->cm


Modified: wasko/trunk/waskoweb/controllers/case.py
===================================================================
--- wasko/trunk/waskoweb/controllers/case.py	2011-11-01 13:16:36 UTC (rev 5514)
+++ wasko/trunk/waskoweb/controllers/case.py	2011-11-01 13:25:16 UTC (rev 5515)
@@ -50,7 +50,7 @@
 
 class CaseController(MpulsCaseController):
 
-    @checkRole('cm_ka')
+    @checkRole('cm')
     def newAction(self):
         # TODO: Use htmlfill here!
         session_case = SessionCase()
@@ -94,7 +94,7 @@
 
         return self.select(str(case.id))
 
-    @checkRole('cm_ka')
+    @checkRole('cm')
     def neuaufnahmeAction(self):
         try:
             session_case = session['case']
@@ -120,7 +120,7 @@
                 defaults = error.value,
                 errors  = error.error_dict)
 
-    @checkRole('cm_ka')
+    @checkRole('cm')
     def wiederaufnahmeAction(self):
         try:
             session_case = session['case']

Modified: wasko/trunk/waskoweb/controllers/settings.py
===================================================================
--- wasko/trunk/waskoweb/controllers/settings.py	2011-11-01 13:16:36 UTC (rev 5514)
+++ wasko/trunk/waskoweb/controllers/settings.py	2011-11-01 13:25:16 UTC (rev 5515)
@@ -29,14 +29,14 @@
         c.agency = Agency()
         return render('/settings/show.mako')
 
-    @checkRole('admin_ka')
+    @checkRole('admin')
     def edit(self):
         c.form_errors = {}
         c.form_result = {}
         c.agency = Agency()
         return render('/settings/edit.mako')
     
-    @checkRole('admin_ka')
+    @checkRole('admin')
     def editAction(self):
         validator = EditSettingsForm()
         c.agency = Agency()

Modified: wasko/trunk/waskoweb/templates/casemanagement/main.mako
===================================================================
--- wasko/trunk/waskoweb/templates/casemanagement/main.mako	2011-11-01 13:16:36 UTC (rev 5514)
+++ wasko/trunk/waskoweb/templates/casemanagement/main.mako	2011-11-01 13:25:16 UTC (rev 5515)
@@ -81,7 +81,7 @@
   <div class="menu">
     <h1>${_('case document')}</h1>
     <div class="actions">
-    % if h.hasRole(['cm_ka', 'admin_ka']):
+    % if h.hasRole(['cm', 'admin']):
       ${self.buildInfofield()}
       <ul>
         <li>
@@ -107,7 +107,7 @@
                onclick="return checkModification();">Verwaltung</a>
         </li>
         % endif
-        % if h.hasRole(['cm_ka']) and g.mpuls_config.is_enabled('case-module', 'logbook'):
+        % if h.hasRole(['cm']) and g.mpuls_config.is_enabled('case-module', 'logbook'):
             <li>
                 <a href="${h.url_for(controller='logbook',
                                      action='index',
@@ -123,7 +123,7 @@
     <ul class="mainMenu" id="mainMenuCase"> <!--ID only because of IE6 -->
         <li>${_('More options')}
             <ul>
-            % if h.hasRole(['cm_ka', 'admin_ka']):
+            % if h.hasRole(['cm', 'admin']):
                 % if g.mpuls_config.is_enabled('case-module', 'organisation'):
                 <li>
                     <a href="${h.url_for(controller='case', 
@@ -204,7 +204,7 @@
               ${_('Summary')}
           </a>
         </li>
-        % if h.hasRole(['cm_ka', 'admin_ka']):
+        % if h.hasRole(['cm', 'admin']):
           <li>
             <a href="${h.url_for(controller='phase', action='overview', id=session.get('case').id)}"
                onclick="return checkModification();">
@@ -225,7 +225,7 @@
               </a>
             </li>
           % endif
-          % if h.hasRole(['cm_ka']) and g.mpuls_config.is_enabled('case-module', 'logbook'):
+          % if h.hasRole(['cm']) and g.mpuls_config.is_enabled('case-module', 'logbook'):
             <li>
               <a href="${h.url_for(controller='logbook', action='index', id=session.get('case').id)}" 
                  onclick="return checkModification();">



More information about the Mpuls-commits mailing list