diff --git a/CHANGELOG-BETA.md b/CHANGELOG-BETA.md index f3f6d1ab2..a1d98705c 100644 --- a/CHANGELOG-BETA.md +++ b/CHANGELOG-BETA.md @@ -1,5 +1,16 @@ # 🚀 版本日志 +### 2.10.42.4-beta + +### 🐣 新增功能 + + +### 🐞 解决BUG、优化功能 + +1. 【server】优化 仓库账号、 SSH 证书密码支持选择环境变量 + +------ + ### 2.10.42.3-beta (2023-08-04) ### 🐣 新增功能 diff --git a/modules/server/src/main/java/org/dromara/jpom/controller/system/WorkspaceEnvVarController.java b/modules/server/src/main/java/org/dromara/jpom/controller/system/WorkspaceEnvVarController.java index db012c73c..7b6300639 100644 --- a/modules/server/src/main/java/org/dromara/jpom/controller/system/WorkspaceEnvVarController.java +++ b/modules/server/src/main/java/org/dromara/jpom/controller/system/WorkspaceEnvVarController.java @@ -95,7 +95,7 @@ public class WorkspaceEnvVarController extends BaseServerController { @PostMapping(value = "/all", produces = MediaType.APPLICATION_JSON_VALUE) @Feature(method = MethodFeature.LIST) public JsonMessage> allList(HttpServletRequest request) { - List list = workspaceEnvVarService.allList(request); + List list = workspaceEnvVarService.listByWorkspace(request); list.forEach(workspaceEnvVarModel -> { Integer privacy = workspaceEnvVarModel.getPrivacy(); if (privacy != null && privacy == 1) { diff --git a/modules/server/src/main/java/org/dromara/jpom/service/system/WorkspaceEnvVarService.java b/modules/server/src/main/java/org/dromara/jpom/service/system/WorkspaceEnvVarService.java index 414525fc9..1437d1a5c 100644 --- a/modules/server/src/main/java/org/dromara/jpom/service/system/WorkspaceEnvVarService.java +++ b/modules/server/src/main/java/org/dromara/jpom/service/system/WorkspaceEnvVarService.java @@ -107,7 +107,16 @@ public class WorkspaceEnvVarService extends BaseWorkspaceService allList(HttpServletRequest request) { - return super.listByWorkspace(request); + @Override + public List listByWorkspace(HttpServletRequest request) { + String workspaceIds = BaseWorkspaceService.getWorkspaceId(request); + List split = StrUtil.splitTrim(workspaceIds, StrUtil.COMMA); + for (String workspaceId : split) { + checkUserWorkspace(workspaceId); + } + Entity entity = Entity.create(); + entity.set("workspaceId", split); + List entities = super.queryList(entity); + return super.entityToBeanList(entities); } } diff --git a/web-vue/src/api/workspace.js b/web-vue/src/api/workspace.js index 54b317a15..f72690733 100644 --- a/web-vue/src/api/workspace.js +++ b/web-vue/src/api/workspace.js @@ -94,10 +94,11 @@ export function getWorkspaceEnvList(params) { * @param {*} * } params */ -export function getWorkspaceEnvAll() { +export function getWorkspaceEnvAll(data) { return axios({ url: "/system/workspace_env/all", - method: "post" + method: "post", + data, }); } diff --git a/web-vue/src/components/customInput/index.vue b/web-vue/src/components/customInput/index.vue index 110176bdb..1857d3c95 100644 --- a/web-vue/src/components/customInput/index.vue +++ b/web-vue/src/components/customInput/index.vue @@ -1,6 +1,6 @@