完善文章分类权限
This commit is contained in:
parent
46172e4fa8
commit
07a9417343
|
|
@ -51,7 +51,8 @@ class PermissionRepo
|
|||
['title' => trans('admin/common.brand'), 'permissions' => $this->getBrandPermissions()],
|
||||
['title' => trans('admin/common.customer'), 'permissions' => $this->getCustomerPermissions()],
|
||||
['title' => trans('admin/common.customer_group'), 'permissions' => $this->getCustomerGroupPermissions()],
|
||||
['title' => trans('admin/common.content'), 'permissions' => $this->getContentPermissions()],
|
||||
['title' => trans('admin/common.page'), 'permissions' => $this->getPagePermissions()],
|
||||
['title' => trans('admin/common.page_category'), 'permissions' => $this->getPageCategoryPermissions()],
|
||||
['title' => trans('admin/common.setting'), 'permissions' => $this->getSettingPermissions()],
|
||||
|
||||
['title' => trans('admin/common.plugin'), 'permissions' => $this->getPluginPermissions()],
|
||||
|
|
@ -188,10 +189,10 @@ class PermissionRepo
|
|||
}
|
||||
|
||||
/**
|
||||
* 内容管理列表
|
||||
* @return mixed
|
||||
* 文章管理列表
|
||||
* @return array
|
||||
*/
|
||||
private function getContentPermissions()
|
||||
private function getPagePermissions(): array
|
||||
{
|
||||
$routes = ['pages_index', 'pages_create', 'pages_show', 'pages_update', 'pages_delete'];
|
||||
$items = $this->getPermissionList('page', $routes);
|
||||
|
|
@ -199,10 +200,22 @@ class PermissionRepo
|
|||
return hook_filter('role.page_permissions', $items);
|
||||
}
|
||||
|
||||
/**
|
||||
* 文章分类管理列表
|
||||
* @return array
|
||||
*/
|
||||
private function getPageCategoryPermissions(): array
|
||||
{
|
||||
$routes = ['page_categories_index', 'page_categories_create', 'page_categories_show', 'page_categories_update', 'page_categories_delete'];
|
||||
$items = $this->getPermissionList('page_category', $routes);
|
||||
|
||||
return hook_filter('role.page_category_permissions', $items);
|
||||
}
|
||||
|
||||
/**
|
||||
* 插件权限列表
|
||||
*
|
||||
* @return array[]
|
||||
* @return array
|
||||
*/
|
||||
private function getPluginPermissions(): array
|
||||
{
|
||||
|
|
@ -215,9 +228,9 @@ class PermissionRepo
|
|||
/**
|
||||
* 后台管理员权限列表
|
||||
*
|
||||
* @return mixed
|
||||
* @return array
|
||||
*/
|
||||
private function getAdminUserPermissions()
|
||||
private function getAdminUserPermissions(): array
|
||||
{
|
||||
$routes = ['admin_users_index', 'admin_users_create', 'admin_users_show', 'admin_users_update', 'admin_users_delete'];
|
||||
$items = $this->getPermissionList('user', $routes);
|
||||
|
|
@ -228,9 +241,9 @@ class PermissionRepo
|
|||
/**
|
||||
* 后台管理员权限列表
|
||||
*
|
||||
* @return mixed
|
||||
* @return array
|
||||
*/
|
||||
private function getAdminRolePermissions()
|
||||
private function getAdminRolePermissions(): array
|
||||
{
|
||||
$routes = ['admin_roles_index', 'admin_roles_create', 'admin_roles_show', 'admin_roles_update', 'admin_roles_delete'];
|
||||
$items = $this->getPermissionList('role', $routes);
|
||||
|
|
@ -241,7 +254,7 @@ class PermissionRepo
|
|||
/**
|
||||
* 区域分组权限列表
|
||||
*
|
||||
* @return array[]
|
||||
* @return array
|
||||
*/
|
||||
private function getRegionPermissions(): array
|
||||
{
|
||||
|
|
|
|||
|
|
@ -31,7 +31,8 @@ return [
|
|||
'category' => '分类管理',
|
||||
'customer_group' => '客户组管理',
|
||||
'customer' => '客户管理',
|
||||
'content' => '内容管理',
|
||||
'page' => '文章管理',
|
||||
'page_category' => '文章分类',
|
||||
'setting' => '系统设置',
|
||||
'plugin' => '插件管理',
|
||||
'marketing' => '插件市场',
|
||||
|
|
|
|||
|
|
@ -1,18 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
* page.php
|
||||
*
|
||||
* @copyright 2022 beikeshop.com - All Rights Reserved
|
||||
* @link https://beikeshop.com
|
||||
* @author Edward Yang <yangjin@guangda.work>
|
||||
* @created 2022-08-02 14:22:41
|
||||
* @modified 2022-08-02 14:22:41
|
||||
*/
|
||||
|
||||
return [
|
||||
'index' => '文章分类',
|
||||
'info_title' => '信息标题',
|
||||
'info_content' => '内容',
|
||||
|
||||
'pages_index' => '分类列表',
|
||||
];
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
<?php
|
||||
/**
|
||||
* page.php
|
||||
*
|
||||
* @copyright 2022 beikeshop.com - All Rights Reserved
|
||||
* @link https://beikeshop.com
|
||||
* @author Edward Yang <yangjin@guangda.work>
|
||||
* @created 2022-08-02 14:22:41
|
||||
* @modified 2022-08-02 14:22:41
|
||||
*/
|
||||
|
||||
return [
|
||||
'index' => '文章分类',
|
||||
'info_title' => '分类标题',
|
||||
'info_content' => '内容',
|
||||
|
||||
'page_categories_index' => '文章列表',
|
||||
'page_categories_create' => '创建文章',
|
||||
'page_categories_show' => '文章详情',
|
||||
'page_categories_update' => '文章编辑',
|
||||
'page_categories_delete' => '删除文章',
|
||||
];
|
||||
|
|
@ -63,7 +63,6 @@ return [
|
|||
'return' => '返回',
|
||||
'language' => '语言',
|
||||
'select_all' => '全选',
|
||||
'sign_out' => '退出登录',
|
||||
'menu' => '菜单',
|
||||
'whether_open' => '是否开启',
|
||||
'default' => '默认',
|
||||
|
|
|
|||
Loading…
Reference in New Issue