From 99c857d5868a6237408d7edba0da7e697f1738e7 Mon Sep 17 00:00:00 2001 From: mokaddem Date: Fri, 3 Sep 2021 09:49:20 +0200 Subject: [PATCH] chg: [aclcomponent] Added ACL entry --- src/Controller/AppController.php | 4 ++++ src/Controller/Component/ACLComponent.php | 24 +++++++++++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/src/Controller/AppController.php b/src/Controller/AppController.php index ee1c1b1..913a633 100644 --- a/src/Controller/AppController.php +++ b/src/Controller/AppController.php @@ -127,6 +127,10 @@ class AppController extends Controller $this->request->getParam('prefix'); $this->set('darkMode', !empty(Configure::read('Cerebrate')['ui.dark'])); $this->set('baseurl', Configure::read('App.fullBaseUrl')); + + if ($this->modelClass == 'Tags.Tags') { + $this->set('metaGroup', !empty($this->isAdmin) ? 'Administration' : 'Cerebrate'); + } } private function authApiUser(): void diff --git a/src/Controller/Component/ACLComponent.php b/src/Controller/Component/ACLComponent.php index fc8966c..8e0e25f 100644 --- a/src/Controller/Component/ACLComponent.php +++ b/src/Controller/Component/ACLComponent.php @@ -747,6 +747,30 @@ class ACLComponent extends Component 'label' => __('List Outbox Processors'), 'skipTopMenu' => 1 ] + ], + 'skipTopMenu' => true, + ], + 'Tags' => [ + 'label' => __('Tags'), + 'url' => '/tags/index', + 'children' => [ + 'index' => [ + 'url' => '/tags/index', + 'label' => __('List Tags'), + ], + 'view' => [ + 'url' => '/tags/view/{{id}}', + 'label' => __('View Tags'), + 'actions' => ['delete', 'edit', 'view'], + 'skipTopMenu' => true, + ], + 'delete' => [ + 'url' => '/tags/delete/{{id}}', + 'label' => __('Delete Tag'), + 'actions' => ['delete', 'edit', 'view'], + 'skipTopMenu' => true, + 'popup' => 1 + ], ] ], 'MetaTemplates' => [