|
@@ -127,6 +127,12 @@ class SystemUserLogic extends BaseLogic
|
|
|
throw new ApiException('没有权限操作该角色数据');
|
|
throw new ApiException('没有权限操作该角色数据');
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+ // 如果修改了部门,则清空权限
|
|
|
|
|
+ if ($user->dept_id != $data['dept_id']) {
|
|
|
|
|
+ $data['game_list'] = null;
|
|
|
|
|
+ $data['normal_game_list'] = null;
|
|
|
|
|
+ $data['ad_permission'] = null;
|
|
|
|
|
+ }
|
|
|
$result = parent::edit($id, $data);
|
|
$result = parent::edit($id, $data);
|
|
|
if ($result) {
|
|
if ($result) {
|
|
|
$user->roles()->detach();
|
|
$user->roles()->detach();
|