From 79545db96ee8a53bc22d753f24af65aaa97755bf Mon Sep 17 00:00:00 2001 From: "benjamin.baker" Date: Mon, 7 Sep 2026 13:36:06 -0400 Subject: [PATCH] Add a Delete action to the applications list and withdraw the app policy The Applications page had no delete control even though the endpoint and the API client both already existed, so the gap was UI-only. The button is gated on applications.delete via hasPermission rather than on the admin role, mirroring the backend guard: admins bypass it anyway, and a non-admin role granted the permission should get the button instead of a control that would only 403. Deleting also withdraws the generated install policy. Delete here is a soft delete, and the policy is a separate row that did not follow, so a deactivated application kept installing itself across the fleet with nothing on screen to explain why. A customised policy is still left alone, on the same ownership terms as unticking the box. --- .../frontend/views/ApplicationsList.vue | 37 ++++++- shopdb/core/api/applications.py | 7 ++ tests/test_core/test_application_delete.py | 98 +++++++++++++++++++ 3 files changed, 141 insertions(+), 1 deletion(-) create mode 100644 tests/test_core/test_application_delete.py diff --git a/plugins/applications/frontend/views/ApplicationsList.vue b/plugins/applications/frontend/views/ApplicationsList.vue index d8a5e011..3e7a71f1 100644 --- a/plugins/applications/frontend/views/ApplicationsList.vue +++ b/plugins/applications/frontend/views/ApplicationsList.vue @@ -73,6 +73,13 @@ > View + @@ -98,14 +105,21 @@