Merge pull request #3575 from dataease/pr@dev@dataset

fix(数据集): 行列权限白名单用户列表
This commit is contained in:
Junjun 2022-11-01 13:00:59 +08:00 committed by GitHub
commit 38af75c1ef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 44 additions and 0 deletions

View File

@ -4,9 +4,12 @@ import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.github.xiaoymin.knife4j.annotations.ApiSupport;
import io.dataease.auth.annotation.DeLog;
import io.dataease.auth.annotation.DePermission;
import io.dataease.auth.api.dto.CurrentUserDto;
import io.dataease.auth.entity.AccountLockStatus;
import io.dataease.auth.service.AuthUserService;
import io.dataease.commons.constants.DePermissionType;
import io.dataease.commons.constants.ResourceAuthLevel;
import io.dataease.commons.constants.SysLogConstants;
import io.dataease.commons.exception.DEException;
import io.dataease.commons.utils.BeanUtils;
@ -86,6 +89,17 @@ public class SysUserController {
return PageUtils.setPageInfo(page, users);
}
@DePermission(type = DePermissionType.DATASET, level = ResourceAuthLevel.DATASET_LEVEL_MANAGE)
@PostMapping("/userGrid/{datasetId}")
@ApiImplicitParams({
@ApiImplicitParam(paramType = "path", name = "goPage", value = "页码", required = true, dataType = "Integer"),
@ApiImplicitParam(paramType = "path", name = "pageSize", value = "页容量", required = true, dataType = "Integer"),
@ApiImplicitParam(name = "request", value = "查询条件", required = true)
})
public Pager<List<SysUserGridResponse>> userGrids(@PathVariable String datasetId, @RequestBody KeyGridRequest request) {
return userGrid(0, 0, request);
}
@ApiIgnore
@PostMapping("/userLists")
public List<SysUserGridResponse> userLists(@RequestBody BaseGridRequest request) {

View File

@ -5,8 +5,11 @@ import cn.hutool.core.collection.CollectionUtil;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import io.dataease.auth.annotation.DeLog;
import io.dataease.auth.annotation.DePermission;
import io.dataease.auth.service.ExtAuthService;
import io.dataease.commons.constants.AuthConstants;
import io.dataease.commons.constants.DePermissionType;
import io.dataease.commons.constants.ResourceAuthLevel;
import io.dataease.commons.constants.SysLogConstants;
import io.dataease.commons.exception.DEException;
import io.dataease.commons.utils.BeanUtils;
@ -160,6 +163,18 @@ public class XDeptServer {
return setPageInfo;
}
@DePermission(type = DePermissionType.DATASET, level = ResourceAuthLevel.DATASET_LEVEL_MANAGE)
@ApiOperation("查询用户")
@ApiImplicitParams({
@ApiImplicitParam(paramType = "path", name = "goPage", value = "页码", required = true, dataType = "Integer"),
@ApiImplicitParam(paramType = "path", name = "pageSize", value = "页容量", required = true, dataType = "Integer"),
@ApiImplicitParam(name = "request", value = "查询条件", required = true)
})
@PostMapping("/userGrid/{datasetId}")
public Pager<List<DeptUserItemDTO>> userGrids(@PathVariable String datasetId, @RequestBody XpackDeptUserRequest request) {
return userGrid(0,0, request);
}
@RequiresPermissions({"dept:edit", "user:edit"})
@PostMapping("/bindUser")
public void bindUser(@RequestBody XpackDeptBindRequest request) {

View File

@ -4,8 +4,11 @@ package io.dataease.plugins.server;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import io.dataease.auth.annotation.DeLog;
import io.dataease.auth.annotation.DePermission;
import io.dataease.auth.service.ExtAuthService;
import io.dataease.commons.constants.AuthConstants;
import io.dataease.commons.constants.DePermissionType;
import io.dataease.commons.constants.ResourceAuthLevel;
import io.dataease.commons.constants.SysLogConstants;
import io.dataease.commons.utils.DeLogUtils;
import io.dataease.commons.utils.PageUtils;
@ -120,6 +123,18 @@ public class XRoleServer {
return setPageInfo;
}
@DePermission(type = DePermissionType.DATASET, level = ResourceAuthLevel.DATASET_LEVEL_MANAGE)
@ApiOperation("查询角色下用户")
@ApiImplicitParams({
@ApiImplicitParam(paramType = "path", name = "goPage", value = "页码", required = true, dataType = "Integer"),
@ApiImplicitParam(paramType = "path", name = "pageSize", value = "页容量", required = true, dataType = "Integer"),
@ApiImplicitParam(name = "request", value = "查询条件", required = true)
})
@PostMapping("/userGrid/{datasetId}")
public Pager<List<RoleUserItem>> userGrids(@PathVariable String datasetId, @RequestBody RoleUserRequest request) {
return userGrid(0,0, request);
}
@RequiresPermissions({"role:edit", "user:edit"})
@ApiOperation("绑定用户")
@PostMapping("/bindUser")