Drop permission config/application/groups/member

refs #8826
This commit is contained in:
Johannes Meyer 2015-06-02 09:08:16 +02:00
parent cf96e66ff2
commit 9bd5d4148e
3 changed files with 6 additions and 8 deletions

View File

@ -129,7 +129,7 @@ class GroupController extends AuthBackendController
$this->view->members = $members; $this->view->members = $members;
$this->createShowTabs($backend->getName(), $groupName)->activate('group/show'); $this->createShowTabs($backend->getName(), $groupName)->activate('group/show');
if ($this->hasPermission('config/application/groups/member/remove') && $backend instanceof Reducible) { if ($this->hasPermission('config/authentication/groups/edit') && $backend instanceof Reducible) {
$removeForm = new Form(); $removeForm = new Form();
$removeForm->setUidDisabled(); $removeForm->setUidDisabled();
$removeForm->setAction( $removeForm->setAction(
@ -228,7 +228,7 @@ class GroupController extends AuthBackendController
*/ */
public function addmemberAction() public function addmemberAction()
{ {
$this->assertPermission('config/application/groups/member/add'); $this->assertPermission('config/authentication/groups/edit');
$groupName = $this->params->getRequired('group'); $groupName = $this->params->getRequired('group');
$backend = $this->getUserGroupBackend($this->params->getRequired('backend'), 'Icinga\Data\Extensible'); $backend = $this->getUserGroupBackend($this->params->getRequired('backend'), 'Icinga\Data\Extensible');
@ -256,7 +256,7 @@ class GroupController extends AuthBackendController
*/ */
public function removememberAction() public function removememberAction()
{ {
$this->assertPermission('config/application/groups/member/remove'); $this->assertPermission('config/authentication/groups/edit');
$this->assertHttpMethod('POST'); $this->assertHttpMethod('POST');
$groupName = $this->params->getRequired('group'); $groupName = $this->params->getRequired('group');
$backend = $this->getUserGroupBackend($this->params->getRequired('backend'), 'Icinga\Data\Reducible'); $backend = $this->getUserGroupBackend($this->params->getRequired('backend'), 'Icinga\Data\Reducible');

View File

@ -121,7 +121,7 @@ class UserController extends AuthBackendController
$memberships $memberships
); );
if ($this->hasPermission('config/application/groups/member/add')) { if ($this->hasPermission('config/authentication/groups/edit')) {
$extensibleBackends = $this->loadUserGroupBackends('Icinga\Data\Extensible'); $extensibleBackends = $this->loadUserGroupBackends('Icinga\Data\Extensible');
$this->view->showCreateMembershipLink = ! empty($extensibleBackends); $this->view->showCreateMembershipLink = ! empty($extensibleBackends);
} else { } else {
@ -133,7 +133,7 @@ class UserController extends AuthBackendController
$this->view->memberships = $memberships; $this->view->memberships = $memberships;
$this->createShowTabs($backend->getName(), $userName)->activate('user/show'); $this->createShowTabs($backend->getName(), $userName)->activate('user/show');
if ($this->hasPermission('config/application/groups/member/remove')) { if ($this->hasPermission('config/authentication/groups/edit')) {
$removeForm = new Form(); $removeForm = new Form();
$removeForm->setUidDisabled(); $removeForm->setUidDisabled();
$removeForm->addElement('hidden', 'user_name', array( $removeForm->addElement('hidden', 'user_name', array(
@ -228,7 +228,7 @@ class UserController extends AuthBackendController
*/ */
public function createmembershipAction() public function createmembershipAction()
{ {
$this->assertPermission('config/application/groups/member/add'); $this->assertPermission('config/authentication/groups/edit');
$userName = $this->params->getRequired('user'); $userName = $this->params->getRequired('user');
$backend = $this->getUserBackend($this->params->getRequired('backend')); $backend = $this->getUserBackend($this->params->getRequired('backend'));

View File

@ -38,8 +38,6 @@ class RoleForm extends ConfigForm
'config/authentication/groups/add' => 'config/authentication/groups/add', 'config/authentication/groups/add' => 'config/authentication/groups/add',
'config/authentication/groups/edit' => 'config/authentication/groups/edit', 'config/authentication/groups/edit' => 'config/authentication/groups/edit',
'config/authentication/groups/remove' => 'config/authentication/groups/remove', 'config/authentication/groups/remove' => 'config/authentication/groups/remove',
'config/application/groups/member/add' => 'config/application/groups/member/add',
'config/application/groups/member/remove' => 'config/application/groups/member/remove',
'config/authentication/roles/*' => 'config/authentication/roles/*', 'config/authentication/roles/*' => 'config/authentication/roles/*',
'config/authentication/roles/show' => 'config/authentication/roles/show', 'config/authentication/roles/show' => 'config/authentication/roles/show',
'config/authentication/roles/add' => 'config/authentication/roles/add', 'config/authentication/roles/add' => 'config/authentication/roles/add',