From 15983a79016f0beaed5418e21c253663a0c8681f Mon Sep 17 00:00:00 2001 From: Craig Yu Date: Wed, 18 Dec 2024 11:45:35 -0800 Subject: [PATCH] feat: #1655 restrict client selection when d admins assign roles (#1701) --- .../AddPermissions/DelegatedAdminSection.vue | 2 +- ...ntSection.vue => ForestClientAddTable.vue} | 4 +- .../ForestClientSelectTable.vue | 167 ++++++++++++++++++ .../AddPermissions/RoleSelectTable.vue | 16 +- .../ManagePermissionsTable/index.vue | 21 ++- frontend/src/components/UI/ErrorText.vue | 8 +- frontend/src/utils/AuthUtils.ts | 44 ++++- 7 files changed, 249 insertions(+), 13 deletions(-) rename frontend/src/components/AddPermissions/{ForestClientSection.vue => ForestClientAddTable.vue} (98%) create mode 100644 frontend/src/components/AddPermissions/ForestClientSelectTable.vue diff --git a/frontend/src/components/AddPermissions/DelegatedAdminSection.vue b/frontend/src/components/AddPermissions/DelegatedAdminSection.vue index 231393786..cb2c86e63 100644 --- a/frontend/src/components/AddPermissions/DelegatedAdminSection.vue +++ b/frontend/src/components/AddPermissions/DelegatedAdminSection.vue @@ -10,7 +10,7 @@ import { inject, type Ref } from "vue"; import Dropdown from "../UI/Dropdown.vue"; import NotificationMessage from "../UI/NotificationMessage.vue"; import SubsectionTitle from "../UI/SubsectionTitle.vue"; -import ForestClientSection from "./ForestClientSection.vue"; +import ForestClientSection from "./ForestClientAddTable.vue"; const formData = inject>(APP_PERMISSION_FORM_KEY); diff --git a/frontend/src/components/AddPermissions/ForestClientSection.vue b/frontend/src/components/AddPermissions/ForestClientAddTable.vue similarity index 98% rename from frontend/src/components/AddPermissions/ForestClientSection.vue rename to frontend/src/components/AddPermissions/ForestClientAddTable.vue index cd1d9c69c..9d2925a2b 100644 --- a/frontend/src/components/AddPermissions/ForestClientSection.vue +++ b/frontend/src/components/AddPermissions/ForestClientAddTable.vue @@ -140,7 +140,7 @@ onUnmounted(() => { diff --git a/frontend/src/components/AddPermissions/RoleSelectTable.vue b/frontend/src/components/AddPermissions/RoleSelectTable.vue index 779a0e43f..8f3c098f9 100644 --- a/frontend/src/components/AddPermissions/RoleSelectTable.vue +++ b/frontend/src/components/AddPermissions/RoleSelectTable.vue @@ -14,7 +14,8 @@ import { ErrorMessage, Field } from "vee-validate"; import { computed, inject, ref, type Ref } from "vue"; import Label from "../UI/Label.vue"; import DelegatedAdminSection from "./DelegatedAdminSection.vue"; -import ForestClientSection from "./ForestClientSection.vue"; +import ForestClientAddTable from "./ForestClientAddTable.vue"; +import ForestClientSelectTable from "./ForestClientSelectTable.vue"; const props = defineProps<{ appId: number; @@ -145,9 +146,18 @@ const handleRoleSelect = (role: FamRoleGrantDto) => {