[icinga-checkins] icinga.org: icingaweb2/master: Security: Remove role suffix from actions

git at icinga.org git at icinga.org
Wed Nov 19 16:31:58 CET 2014


Module: icingaweb2
Branch: master
Commit: e072678b2d01064132d86825ae2e0f6b1d75e781
URL:    https://git.icinga.org/?p=icingaweb2.git;a=commit;h=e072678b2d01064132d86825ae2e0f6b1d75e781

Author: Eric Lippmann <eric.lippmann at netways.de>
Date:   Wed Nov 19 15:23:15 2014 +0100

Security: Remove role suffix from actions

refs #5647

---

 application/controllers/PermissionsController.php                |    6 +++---
 application/views/scripts/permissions/index.phtml                |    6 +++---
 .../views/scripts/permissions/{new-role.phtml => new.phtml}      |    0
 .../scripts/permissions/{remove-role.phtml => remove.phtml}      |    0
 .../scripts/permissions/{update-role.phtml => update.phtml}      |    0
 5 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/application/controllers/PermissionsController.php b/application/controllers/PermissionsController.php
index 5648837..9161553 100644
--- a/application/controllers/PermissionsController.php
+++ b/application/controllers/PermissionsController.php
@@ -15,7 +15,7 @@ class SecurityController extends ActionController
         $this->view->roles = Config::app('roles', true);
     }
 
-    public function newRoleAction()
+    public function newAction()
     {
         $role = new RoleForm(array(
             'onSuccess' => function (RoleForm $role) {
@@ -42,7 +42,7 @@ class SecurityController extends ActionController
         $this->view->form = $role;
     }
 
-    public function updateRoleAction()
+    public function updateAction()
     {
         $name = $this->_request->getParam('role');
         if (empty($name)) {
@@ -86,7 +86,7 @@ class SecurityController extends ActionController
         $this->view->form = $role;
     }
 
-    public function removeRoleAction()
+    public function removeAction()
     {
         $name = $this->_request->getParam('role');
         if (empty($name)) {
diff --git a/application/views/scripts/permissions/index.phtml b/application/views/scripts/permissions/index.phtml
index 3dc571c..520f42d 100644
--- a/application/views/scripts/permissions/index.phtml
+++ b/application/views/scripts/permissions/index.phtml
@@ -19,14 +19,14 @@
                         <td>
                             <?= $this->escape($name) ?>
                             <div class="hidden">
-                                <a href="<?= $this->url('security/update-role', array('role' => $name)) ?>"></a>
+                                <a href="<?= $this->url('permissions/update', array('role' => $name)) ?>"></a>
                             </div>
                         </td>
                         <td><?= $this->escape($role->permissions) ?></td>
                         <td><?= $this->escape($role->users) ?></td>
                         <td><?= $this->escape($role->groups) ?></td>
                         <td>
-                            <a href="<?= $this->url('security/remove-role', array('role' => $name)) ?>">
+                            <a href="<?= $this->url('permissions/remove', array('role' => $name)) ?>">
                                 <?= $this->translate('Remove role') ?>
                             </a>
                         </td>
@@ -35,7 +35,7 @@
                 </tbody>
             </table>
         <?php endif ?>
-        <a data-base-target="_next" href="<?= $this->href('security/new-role') ?>">
+        <a data-base-target="_next" href="<?= $this->href('permissions/new') ?>">
             <?= $this->translate('New Role') ?>
         </a>
     </div>
diff --git a/application/views/scripts/permissions/new-role.phtml b/application/views/scripts/permissions/new.phtml
similarity index 100%
rename from application/views/scripts/permissions/new-role.phtml
rename to application/views/scripts/permissions/new.phtml
diff --git a/application/views/scripts/permissions/remove-role.phtml b/application/views/scripts/permissions/remove.phtml
similarity index 100%
rename from application/views/scripts/permissions/remove-role.phtml
rename to application/views/scripts/permissions/remove.phtml
diff --git a/application/views/scripts/permissions/update-role.phtml b/application/views/scripts/permissions/update.phtml
similarity index 100%
rename from application/views/scripts/permissions/update-role.phtml
rename to application/views/scripts/permissions/update.phtml



More information about the icinga-checkins mailing list