mirror of
https://github.com/crmeb/CRMEB.git
synced 2026-10-29 14:01:07 +00:00
优化权限设置
This commit is contained in:
parent
d8450bce0f
commit
d0d6c6192a
@ -180,6 +180,7 @@ class SystemMenus extends AuthController
|
||||
'pid' => $menu['path'],
|
||||
'auth_type' => 2,
|
||||
'is_show' => 1,
|
||||
'is_show_path' => 1,
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
@ -78,9 +78,6 @@ class SystemRole extends AuthController
|
||||
if (!is_array($data['rules']) || !count($data['rules']))
|
||||
return app('json')->fail(400221);
|
||||
|
||||
$res = app()->make(SystemMenusServices::class)->getColumn([['pid', 'in', $data['rules']]], 'id');
|
||||
$data['rules'] = array_merge($data['rules'], $res);
|
||||
|
||||
$data['rules'] = implode(',', $data['rules']);
|
||||
if ($id) {
|
||||
if (!$this->services->update($id, $data)) return app('json')->fail(100007);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user