Security: Remove role suffix from actions

refs #5647
This commit is contained in:
Eric Lippmann 2014-11-19 15:23:15 +01:00
parent 5b4c2723e0
commit e072678b2d
5 changed files with 6 additions and 6 deletions

View File

@ -15,7 +15,7 @@ class SecurityController extends ActionController
$this->view->roles = Config::app('roles', true); $this->view->roles = Config::app('roles', true);
} }
public function newRoleAction() public function newAction()
{ {
$role = new RoleForm(array( $role = new RoleForm(array(
'onSuccess' => function (RoleForm $role) { 'onSuccess' => function (RoleForm $role) {
@ -42,7 +42,7 @@ class SecurityController extends ActionController
$this->view->form = $role; $this->view->form = $role;
} }
public function updateRoleAction() public function updateAction()
{ {
$name = $this->_request->getParam('role'); $name = $this->_request->getParam('role');
if (empty($name)) { if (empty($name)) {
@ -86,7 +86,7 @@ class SecurityController extends ActionController
$this->view->form = $role; $this->view->form = $role;
} }
public function removeRoleAction() public function removeAction()
{ {
$name = $this->_request->getParam('role'); $name = $this->_request->getParam('role');
if (empty($name)) { if (empty($name)) {

View File

@ -19,14 +19,14 @@
<td> <td>
<?= $this->escape($name) ?> <?= $this->escape($name) ?>
<div class="hidden"> <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> </div>
</td> </td>
<td><?= $this->escape($role->permissions) ?></td> <td><?= $this->escape($role->permissions) ?></td>
<td><?= $this->escape($role->users) ?></td> <td><?= $this->escape($role->users) ?></td>
<td><?= $this->escape($role->groups) ?></td> <td><?= $this->escape($role->groups) ?></td>
<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') ?> <?= $this->translate('Remove role') ?>
</a> </a>
</td> </td>
@ -35,7 +35,7 @@
</tbody> </tbody>
</table> </table>
<?php endif ?> <?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') ?> <?= $this->translate('New Role') ?>
</a> </a>
</div> </div>