|
|
@@ -9,6 +9,7 @@ import com.vber.common.log.annotation.Log;
|
|
|
import com.vber.common.log.enums.BusinessType;
|
|
|
import com.vber.common.mybatis.core.page.PageQuery;
|
|
|
import com.vber.common.mybatis.core.page.TableDataInfo;
|
|
|
+import com.vber.common.satoken.utils.LoginHelper;
|
|
|
import com.vber.common.web.core.BaseController;
|
|
|
import com.vber.system.domain.SysUserRole;
|
|
|
import com.vber.system.domain.bo.SysOrgBo;
|
|
|
@@ -116,7 +117,9 @@ public class SysRoleController extends BaseController {
|
|
|
}
|
|
|
|
|
|
if (roleService.updateRole(role) > 0) {
|
|
|
- roleService.cleanOnlineUserByRole(role.getRoleId());
|
|
|
+ if (!LoginHelper.isSuperAdmin()) {
|
|
|
+ roleService.cleanOnlineUserByRole(role.getRoleId());
|
|
|
+ }
|
|
|
return R.ok();
|
|
|
}
|
|
|
return R.fail("修改角色'" + role.getRoleName() + "'失败,请联系管理员");
|
|
|
@@ -132,7 +135,13 @@ public class SysRoleController extends BaseController {
|
|
|
public R<Void> dataScope(@RequestBody SysRoleBo role) {
|
|
|
roleService.checkRoleAllowed(role);
|
|
|
roleService.checkRoleDataScope(role.getRoleId());
|
|
|
- return toAjax(roleService.authDataScope(role));
|
|
|
+ if (roleService.authDataScope(role) > 0) {
|
|
|
+ if (!LoginHelper.isSuperAdmin()) {
|
|
|
+ roleService.cleanOnlineUserByRole(role.getRoleId());
|
|
|
+ }
|
|
|
+ return R.ok();
|
|
|
+ }
|
|
|
+ return R.fail("修改角色'" + role.getRoleName() + "'数据权限失败,请联系管理员");
|
|
|
}
|
|
|
|
|
|
/**
|