默认模块限制编辑
This commit is contained in:
parent
77e617d511
commit
50eb87d82d
@ -34,8 +34,9 @@ class Module extends BaseController
|
||||
if (request()->isAjax()) {
|
||||
$param['name'] = preg_replace('# #','',$param['name']);
|
||||
if ($param['id'] > 0) {
|
||||
if($param['id'] == 1 || $param['id'] == 2){
|
||||
return to_assign(1,'系统默认模块不能编辑');
|
||||
$module = Db::name('AdminModule')->where('id',$param['id'])->find();
|
||||
if($module['type'] == 1){
|
||||
return to_assign(1,'系统模块不能编辑');
|
||||
}
|
||||
try {
|
||||
validate(ModuleCheck::class)->scene('edit')->check($param);
|
||||
|
@ -68,7 +68,6 @@ class Role extends BaseController
|
||||
}
|
||||
//清除菜单\权限缓存
|
||||
clear_cache('adminMenu');
|
||||
clear_cache('adminRules');
|
||||
return to_assign();
|
||||
} else {
|
||||
$id = isset($param['id']) ? $param['id'] : 0;
|
||||
|
@ -160,9 +160,9 @@ INSERT INTO `oa_admin_rule` VALUES (9, 0, '', '财务管理', '财务管理', 'C
|
||||
INSERT INTO `oa_admin_rule` VALUES (10, 0, '', '商业智能', '商业智能', 'BI', 'icon-jiaoxuetongji', 1, 10, 1, 0, 0);
|
||||
|
||||
INSERT INTO `oa_admin_rule` VALUES (11, 1, 'home/conf/index', '系统配置', '系统配置', 'HOME', '', 1, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (12, 11, 'home/conf/add', '新建/编辑配置项', '配置项', 'HOME', '', 2, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (13, 11, 'home/conf/edit', '编辑配置详情', '配置详情', 'HOME', '', 2, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (14, 11, 'home/conf/delete', '删除配置项', '配置项', 'HOME', '', 2, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (12, 11, 'home/conf/add', '新建/编辑', '配置项', 'HOME', '', 2, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (13, 11, 'home/conf/delete', '删除', '配置项', 'HOME', '', 2, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (14, 11, 'home/conf/edit', '编辑', '配置详情', 'HOME', '', 2, 1, 1, 0, 0);
|
||||
|
||||
INSERT INTO `oa_admin_rule` VALUES (15, 1, 'home/module/index', '功能模块', '功能模块', 'HOME', '', 1, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (16, 15, 'home/module/add', '新建/编辑', '功能模块', 'HOME', '', 2, 1, 1, 0, 0);
|
||||
|
@ -88,7 +88,6 @@ class User extends BaseController
|
||||
add_log('edit', $param['id'], $param);
|
||||
//清除菜单\权限缓存
|
||||
clear_cache('adminMenu');
|
||||
clear_cache('adminRules');
|
||||
// 提交事务
|
||||
Db::commit();
|
||||
} catch (\Exception $e) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user