role/[add|edit|remove]: Set `__CLOSE__` as redirect target

The form is also reachable through the audit view now. This
results in the correct handling in either of both views.
This commit is contained in:
Johannes Meyer 2021-03-30 13:31:19 +02:00
parent fa2c3c8999
commit 65cfa9236c
1 changed files with 3 additions and 3 deletions

View File

@ -84,7 +84,7 @@ class RoleController extends AuthBackendController
$this->assertPermission('config/access-control/roles');
$role = new RoleForm();
$role->setRedirectUrl('role/list');
$role->setRedirectUrl('__CLOSE__');
$role->setRepository(new RolesConfig());
$role->setSubmitLabel($this->translate('Create Role'));
$role->add()->handleRequest();
@ -103,7 +103,7 @@ class RoleController extends AuthBackendController
$name = $this->params->getRequired('role');
$role = new RoleForm();
$role->setRedirectUrl('role/list');
$role->setRedirectUrl('__CLOSE__');
$role->setRepository(new RolesConfig());
$role->setSubmitLabel($this->translate('Update Role'));
$role->edit($name);
@ -126,7 +126,7 @@ class RoleController extends AuthBackendController
$name = $this->params->getRequired('role');
$role = new RoleForm();
$role->setRedirectUrl('role/list');
$role->setRedirectUrl('__CLOSE__');
$role->setRepository(new RolesConfig());
$role->setSubmitLabel($this->translate('Remove Role'));
$role->remove($name);