From 51fa1346ab98dba32e4caeda91ff1a18717afefb Mon Sep 17 00:00:00 2001 From: usingtechnology <39388115+usingtechnology@users.noreply.github.com> Date: Tue, 7 Jan 2025 08:54:24 -0800 Subject: [PATCH] =?UTF-8?q?FORMS-1563:=20auto-approve=20new=20ext=20api=20?= =?UTF-8?q?when=20same=20ministry/url=20already=20a=E2=80=A6=20(#1543)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * FORMS-1563: auto-approve new ext api when same ministry/url already approved. Signed-off-by: Jason Sherman * limit usage of raw sql Signed-off-by: Jason Sherman * add a sql injection block Signed-off-by: Jason Sherman * Show sendApiKey fo admins before approving an api Signed-off-by: Jason Sherman --------- Signed-off-by: Jason Sherman --- .../src/components/admin/AdminAPIsTable.vue | 13 +++ .../components/admin/AdminAPIsTable.spec.js | 6 ++ ...241218233455_062_update_external_api_vw.js | 27 ++++++ app/src/forms/admin/service.js | 35 +++++++- app/src/forms/form/externalApi/service.js | 84 +++++++++++++++---- app/tests/unit/forms/admin/service.spec.js | 4 + .../forms/form/externalApi/service.spec.js | 38 ++++++++- 7 files changed, 184 insertions(+), 23 deletions(-) create mode 100644 app/src/db/migrations/20241218233455_062_update_external_api_vw.js diff --git a/app/frontend/src/components/admin/AdminAPIsTable.vue b/app/frontend/src/components/admin/AdminAPIsTable.vue index 961435f78..fd427de1b 100644 --- a/app/frontend/src/components/admin/AdminAPIsTable.vue +++ b/app/frontend/src/components/admin/AdminAPIsTable.vue @@ -22,6 +22,7 @@ const editDialog = ref({ endpointUrl: null, code: null, allowSendUserToken: false, + sendApiKey: false, }, show: false, }); @@ -108,6 +109,7 @@ function resetEditDialog() { endpointUrl: null, code: null, allowSendUserToken: false, + sendApiKey: false, }, show: false, }; @@ -292,6 +294,17 @@ async function saveItem() { + + +