fixed permissions

This commit is contained in:
Edward Yang 2022-08-08 16:28:44 +08:00
parent 96b7481123
commit 9df01b2900
4 changed files with 22 additions and 2 deletions

View File

@ -159,8 +159,8 @@ class PermissionRepo
private function getContentPermissions()
{
$routes = ['pages_index', 'pages_create', 'pages_show', 'pages_update', 'pages_delete'];
$items = $this->getPermissionList('setting', $routes);
return hook_filter('role.setting_permissions', $items);
$items = $this->getPermissionList('page', $routes);
return hook_filter('role.page_permissions', $items);
}

View File

@ -41,6 +41,7 @@ return [
'currencies_index' => 'Currencies',
'languages_index' => 'Languages',
'design_index' => 'Page Builder',
'design_footer_index' => 'Footer Builder',
'categories_index' => 'Categories',
'products_index' => 'Products',
'products_trashed' => 'Trashed',

View File

@ -0,0 +1,18 @@
<?php
/**
* page.php
*
* @copyright 2022 opencart.cn - All Rights Reserved
* @link http://www.guangdawangluo.com
* @author Edward Yang <yangjin@opencart.cn>
* @created 2022-08-02 14:22:41
* @modified 2022-08-02 14:22:41
*/
return [
'pages_index' => 'Index',
'pages_create' => 'Create',
'pages_show' => 'Detail',
'pages_update' => 'Edit',
'pages_delete' => 'Delete'
];

View File

@ -12,4 +12,5 @@
return [
'settings_index' => 'Setting',
'design_index' => 'Design Builder',
'design_footer_index' => 'Design Footer',
];