Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

Always show the selected principal even if it’s not applicable to the constrained role list.

天舟31941bbd86e8
diff --git a/frontend/src/components/PrincipalSelect.vue b/frontend/src/components/PrincipalSelect.vue
index a3f9844888..51a92408e0 100644
--- a/frontend/src/components/PrincipalSelect.vue
+++ b/frontend/src/components/PrincipalSelect.vue
@@ -85,6 +85,13 @@ export default {
}
);
return list.filter((item: Principal) => {
+ // The previouly selected item might no longer be applicable.
+ // e.g. The select limits to DBA only and the selected principal is no longer a DBA
+ // in such case, we still show the item.
+ if (item.id == props.selectedId) {
+ return true;
+ }
+
return (
item.status == "ACTIVE" &&
// We write this way instead of props.allowedRoleList.includes(item.role)