Merge pull request #7961 from dataease/pr@dev-v2@sync-menu-permissions-fix

fix(同步管理):修复非管理员查看数据连接管理菜单无权限问题
This commit is contained in:
jianneng-fit2cloud 2024-02-01 12:50:30 +08:00 committed by GitHub
commit 4a4bf36602
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 3 additions and 6 deletions

View File

@ -26,11 +26,9 @@ import static io.dataease.constant.AuthResourceEnum.SYNC_DATASOURCE;
@DeApiPath(value = "/sync/datasource", rt = SYNC_DATASOURCE)
public interface SyncDatasourceApi {
@DePermit("m:read")
@PostMapping("/source/pager/{goPage}/{pageSize}")
IPage<SyncDatasourceVO> sourcePager(@PathVariable("goPage") int goPage, @PathVariable("pageSize") int pageSize, @RequestBody BaseGridRequest request);
@DePermit("m:read")
@PostMapping("/target/pager/{goPage}/{pageSize}")
IPage<SyncDatasourceVO> targetPager(@PathVariable("goPage") int goPage, @PathVariable("pageSize") int pageSize, @RequestBody BaseGridRequest request);
@ -52,7 +50,6 @@ public interface SyncDatasourceApi {
@PostMapping("/getSchema")
List<String> getSchema(@RequestBody SyncDatasourceDTO dataSourceDTO) throws DEException;
@DePermit({"#p0+':manage'"})
@GetMapping("/validate/{datasourceId}")
SyncDatasourceDTO validate(@PathVariable("datasourceId") String datasourceId) throws DEException;

View File

@ -7,13 +7,13 @@ import io.dataease.auth.DeApiPath;
import io.dataease.request.BaseGridRequest;
import org.springframework.web.bind.annotation.*;
import static io.dataease.constant.AuthResourceEnum.TASK_LOG;
import static io.dataease.constant.AuthResourceEnum.TASK;
/**
* @author fit2cloud
* @date 2023/12/4 12:43
**/
@DeApiPath(value = "/sync/task/log", rt = TASK_LOG)
@DeApiPath(value = "/sync/task/log", rt = TASK)
public interface TaskLogApi {
@PostMapping("/pager/{goPage}/{pageSize}")
IPage<TaskLogVO> pager(@PathVariable("goPage") int goPage, @PathVariable("pageSize") int pageSize, @RequestBody BaseGridRequest request);

View File

@ -2,7 +2,7 @@ package io.dataease.constant;
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;