From c9ff4ac5f2aa1fd01cc57310e5248f901bc73b66 Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Wed, 23 Feb 2022 17:18:21 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BB=AA=E8=A1=A8=E6=9D=BFapi=E6=9D=83?= =?UTF-8?q?=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/io/dataease/controller/panel/api/LinkApi.java | 8 ++++++++ .../java/io/dataease/controller/panel/api/ShareApi.java | 3 +++ .../java/io/dataease/controller/panel/api/StoreApi.java | 3 +++ 3 files changed, 14 insertions(+) diff --git a/backend/src/main/java/io/dataease/controller/panel/api/LinkApi.java b/backend/src/main/java/io/dataease/controller/panel/api/LinkApi.java index a745d9566d..0a8094aa22 100644 --- a/backend/src/main/java/io/dataease/controller/panel/api/LinkApi.java +++ b/backend/src/main/java/io/dataease/controller/panel/api/LinkApi.java @@ -2,6 +2,8 @@ package io.dataease.controller.panel.api; import com.github.xiaoymin.knife4j.annotations.ApiSupport; +import io.dataease.auth.annotation.DePermission; +import io.dataease.commons.constants.DePermissionType; import io.dataease.controller.request.chart.ChartExtRequest; import io.dataease.controller.request.panel.link.*; import io.dataease.dto.panel.link.GenerateDto; @@ -18,26 +20,32 @@ import java.util.Map; public interface LinkApi { + @DePermission(type = DePermissionType.PANEL, value = "resourceId") @ApiOperation("重置密码") @PostMapping("/resetPwd") void replacePwd(PasswordRequest request); + @DePermission(type = DePermissionType.PANEL, value = "resourceId") @ApiOperation("启用密码") @PostMapping("/enablePwd") void enablePwd(EnablePwdRequest request); + @DePermission(type = DePermissionType.PANEL, value = "resourceId") @ApiOperation("过期时间") @PostMapping("/resetOverTime") void resetOverTime(OverTimeRequest request); + @DePermission(type = DePermissionType.PANEL, value = "resourceId") @ApiOperation("启用/禁用链接分享") @PostMapping("/switchLink") void switchLink(LinkRequest request); + @DePermission(type = DePermissionType.PANEL) @ApiOperation("当前链接信息") @PostMapping("/currentGenerate/{resourceId}") GenerateDto currentGenerate(String resourceId); + @ApiOperation("验证访问") @PostMapping("/validate") ValidateDto validate(LinkValidateRequest request) throws Exception; diff --git a/backend/src/main/java/io/dataease/controller/panel/api/ShareApi.java b/backend/src/main/java/io/dataease/controller/panel/api/ShareApi.java index 78b61a962b..6494c8f24f 100644 --- a/backend/src/main/java/io/dataease/controller/panel/api/ShareApi.java +++ b/backend/src/main/java/io/dataease/controller/panel/api/ShareApi.java @@ -1,7 +1,9 @@ package io.dataease.controller.panel.api; import com.github.xiaoymin.knife4j.annotations.ApiSupport; +import io.dataease.auth.annotation.DePermission; import io.dataease.base.domain.PanelShare; +import io.dataease.commons.constants.DePermissionType; import io.dataease.controller.request.panel.PanelShareFineDto; import io.dataease.controller.request.panel.PanelShareRemoveRequest; import io.dataease.controller.sys.base.BaseGridRequest; @@ -47,6 +49,7 @@ public interface ShareApi { List queryTargets(@PathVariable("panelId") String panelId); + @DePermission(type = DePermissionType.PANEL, value = "resourceId") @ApiOperation("创建分享") @PostMapping("/fineSave") void fineSave(PanelShareFineDto panelShareFineDto); diff --git a/backend/src/main/java/io/dataease/controller/panel/api/StoreApi.java b/backend/src/main/java/io/dataease/controller/panel/api/StoreApi.java index 68456fed8f..f0e8efd983 100644 --- a/backend/src/main/java/io/dataease/controller/panel/api/StoreApi.java +++ b/backend/src/main/java/io/dataease/controller/panel/api/StoreApi.java @@ -1,6 +1,8 @@ package io.dataease.controller.panel.api; import com.github.xiaoymin.knife4j.annotations.ApiSupport; +import io.dataease.auth.annotation.DePermission; +import io.dataease.commons.constants.DePermissionType; import io.dataease.controller.sys.base.BaseGridRequest; import io.dataease.dto.panel.PanelStoreDto; import io.swagger.annotations.Api; @@ -21,6 +23,7 @@ import java.util.List; @RequestMapping("/api/store") public interface StoreApi { + @DePermission(type = DePermissionType.PANEL) @ApiOperation("创建收藏") @PostMapping("/{id}") void store(@PathVariable("id") String id);