Rename permission config/application/roles* to config/authentication/...

Does also split it into *, show, add, edit, remove as this should behave like
any other authentication configuration.

refs #8826
This commit is contained in:
Johannes Meyer 2015-06-02 09:07:06 +02:00
parent 3fffd90135
commit cf96e66ff2
3 changed files with 10 additions and 6 deletions

View File

@ -17,7 +17,7 @@ class RolesController extends AuthBackendController
*/
public function indexAction()
{
$this->assertPermission('config/application/roles');
$this->assertPermission('config/authentication/roles/show');
$this->createListTabs()->activate('roles');
$this->view->roles = Config::app('roles', true);
}
@ -27,7 +27,7 @@ class RolesController extends AuthBackendController
*/
public function newAction()
{
$this->assertPermission('config/application/roles');
$this->assertPermission('config/authentication/roles/add');
$role = new RoleForm(array(
'onSuccess' => function (RoleForm $role) {
$name = $role->getElement('name')->getValue();
@ -61,7 +61,7 @@ class RolesController extends AuthBackendController
*/
public function updateAction()
{
$this->assertPermission('config/application/roles');
$this->assertPermission('config/authentication/roles/edit');
$name = $this->_request->getParam('role');
if (empty($name)) {
throw new Zend_Controller_Action_Exception(
@ -111,7 +111,7 @@ class RolesController extends AuthBackendController
*/
public function removeAction()
{
$this->assertPermission('config/application/roles');
$this->assertPermission('config/authentication/roles/remove');
$name = $this->_request->getParam('role');
if (empty($name)) {
throw new Zend_Controller_Action_Exception(

View File

@ -28,7 +28,6 @@ class RoleForm extends ConfigForm
'config/application/authentication' => 'config/application/authentication',
'config/application/resources' => 'config/application/resources',
'config/application/usergroupbackend' => 'config/application/usergroupbackend',
'config/application/roles' => 'config/application/roles',
'config/authentication/users/*' => 'config/authentication/users/*',
'config/authentication/users/show' => 'config/authentication/users/show',
'config/authentication/users/add' => 'config/authentication/users/add',
@ -41,6 +40,11 @@ class RoleForm extends ConfigForm
'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/show' => 'config/authentication/roles/show',
'config/authentication/roles/add' => 'config/authentication/roles/add',
'config/authentication/roles/edit' => 'config/authentication/roles/edit',
'config/authentication/roles/remove' => 'config/authentication/roles/remove',
'config/modules' => 'config/modules'
);

View File

@ -163,7 +163,7 @@ class AuthBackendController extends Controller
);
}
if ($this->hasPermission('config/application/roles')) {
if ($this->hasPermission('config/authentication/roles/show')) {
$tabs->add(
'roles',
array(