forked from github/dataease
Merge pull request #7961 from dataease/pr@dev-v2@sync-menu-permissions-fix
fix(同步管理):修复非管理员查看数据连接管理菜单无权限问题
This commit is contained in:
commit
4a4bf36602
@ -26,11 +26,9 @@ import static io.dataease.constant.AuthResourceEnum.SYNC_DATASOURCE;
|
|||||||
@DeApiPath(value = "/sync/datasource", rt = SYNC_DATASOURCE)
|
@DeApiPath(value = "/sync/datasource", rt = SYNC_DATASOURCE)
|
||||||
public interface SyncDatasourceApi {
|
public interface SyncDatasourceApi {
|
||||||
|
|
||||||
@DePermit("m:read")
|
|
||||||
@PostMapping("/source/pager/{goPage}/{pageSize}")
|
@PostMapping("/source/pager/{goPage}/{pageSize}")
|
||||||
IPage<SyncDatasourceVO> sourcePager(@PathVariable("goPage") int goPage, @PathVariable("pageSize") int pageSize, @RequestBody BaseGridRequest request);
|
IPage<SyncDatasourceVO> sourcePager(@PathVariable("goPage") int goPage, @PathVariable("pageSize") int pageSize, @RequestBody BaseGridRequest request);
|
||||||
|
|
||||||
@DePermit("m:read")
|
|
||||||
@PostMapping("/target/pager/{goPage}/{pageSize}")
|
@PostMapping("/target/pager/{goPage}/{pageSize}")
|
||||||
IPage<SyncDatasourceVO> targetPager(@PathVariable("goPage") int goPage, @PathVariable("pageSize") int pageSize, @RequestBody BaseGridRequest request);
|
IPage<SyncDatasourceVO> targetPager(@PathVariable("goPage") int goPage, @PathVariable("pageSize") int pageSize, @RequestBody BaseGridRequest request);
|
||||||
|
|
||||||
@ -52,7 +50,6 @@ public interface SyncDatasourceApi {
|
|||||||
@PostMapping("/getSchema")
|
@PostMapping("/getSchema")
|
||||||
List<String> getSchema(@RequestBody SyncDatasourceDTO dataSourceDTO) throws DEException;
|
List<String> getSchema(@RequestBody SyncDatasourceDTO dataSourceDTO) throws DEException;
|
||||||
|
|
||||||
@DePermit({"#p0+':manage'"})
|
|
||||||
@GetMapping("/validate/{datasourceId}")
|
@GetMapping("/validate/{datasourceId}")
|
||||||
SyncDatasourceDTO validate(@PathVariable("datasourceId") String datasourceId) throws DEException;
|
SyncDatasourceDTO validate(@PathVariable("datasourceId") String datasourceId) throws DEException;
|
||||||
|
|
||||||
|
@ -7,13 +7,13 @@ import io.dataease.auth.DeApiPath;
|
|||||||
import io.dataease.request.BaseGridRequest;
|
import io.dataease.request.BaseGridRequest;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import static io.dataease.constant.AuthResourceEnum.TASK_LOG;
|
import static io.dataease.constant.AuthResourceEnum.TASK;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author fit2cloud
|
* @author fit2cloud
|
||||||
* @date 2023/12/4 12:43
|
* @date 2023/12/4 12:43
|
||||||
**/
|
**/
|
||||||
@DeApiPath(value = "/sync/task/log", rt = TASK_LOG)
|
@DeApiPath(value = "/sync/task/log", rt = TASK)
|
||||||
public interface TaskLogApi {
|
public interface TaskLogApi {
|
||||||
@PostMapping("/pager/{goPage}/{pageSize}")
|
@PostMapping("/pager/{goPage}/{pageSize}")
|
||||||
IPage<TaskLogVO> pager(@PathVariable("goPage") int goPage, @PathVariable("pageSize") int pageSize, @RequestBody BaseGridRequest request);
|
IPage<TaskLogVO> pager(@PathVariable("goPage") int goPage, @PathVariable("pageSize") int pageSize, @RequestBody BaseGridRequest request);
|
||||||
|
@ -2,7 +2,7 @@ package io.dataease.constant;
|
|||||||
|
|
||||||
public enum AuthResourceEnum {
|
public enum AuthResourceEnum {
|
||||||
|
|
||||||
PANEL(2, 1), SCREEN(3, 2), DATASET(5, 3), DATASOURCE(6, 4), SYSTEM(7, 0), USER(8, 5), ROLE(8, 6), ORG(9, 7), SYNC_DATASOURCE(10, 8), TASK(11, 9),TASK_LOG(12, 10), SUMMARY(13, 11);
|
PANEL(2, 1), SCREEN(3, 2), DATASET(5, 3), DATASOURCE(6, 4), SYSTEM(7, 0), USER(8, 5), ROLE(8, 6), ORG(9, 7), SYNC_DATASOURCE(23, 8), TASK(24, 9), SUMMARY(22, 10);
|
||||||
|
|
||||||
private long menuId;
|
private long menuId;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user