Skip to content

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

fix: find rule with engine and type (#12941)

ecmadaofb7fb709ae79
diff --git a/frontend/src/components/PlanCheckRun/PlanCheckRunDetail.vue b/frontend/src/components/PlanCheckRun/PlanCheckRunDetail.vue
index 32e1f092a3..aeec33a4fa 100644
--- a/frontend/src/components/PlanCheckRun/PlanCheckRunDetail.vue
+++ b/frontend/src/components/PlanCheckRun/PlanCheckRunDetail.vue
@@ -462,7 +462,13 @@ const reviewPolicy = useReviewPolicyForDatabase(
);
const getActiveRule = (type: string): RuleTemplateV2 | undefined => {
- const rule = reviewPolicy.value?.ruleList.find((rule) => rule.type === type);
+ const engine = props.database?.instanceResource.engine;
+ const rule = reviewPolicy.value?.ruleList.find((rule) => {
+ if (engine && rule.engine !== engine) {
+ return false;
+ }
+ return rule.type === type;
+ });
if (!rule) {
return undefined;
}
diff --git a/frontend/src/components/User/Settings/CreateUserDrawer.vue b/frontend/src/components/User/Settings/CreateUserDrawer.vue
index 63db6897e4..de247d340f 100644
--- a/frontend/src/components/User/Settings/CreateUserDrawer.vue
+++ b/frontend/src/components/User/Settings/CreateUserDrawer.vue
@@ -255,9 +255,9 @@ const availableRoleOptions = computed(
{
type: "group",
key: "project-roles",
- label: `${t("role.project-roles.self")} (${t(
+ label: `${t("role.project-roles.self")} (${t("common.optional")}, ${t(
"role.project-roles.apply-to-all-projects"
- )})`,
+ ).toLocaleLowerCase()})`,
children: PRESET_PROJECT_ROLES.map((role) => ({
label: displayRoleTitle(role),
value: role,
@@ -271,9 +271,9 @@ const availableRoleOptions = computed(
roleGroups.push({
type: "group",
key: "custom-roles",
- label: `${t("role.custom-roles")} (${t(
+ label: `${t("role.custom-roles")} (${t("common.optional")}, ${t(
"role.project-roles.apply-to-all-projects"
- )})`,
+ ).toLocaleLowerCase()})`,
children: customRoles.map((role) => ({
label: displayRoleTitle(role),
value: role,
diff --git a/frontend/src/views/InstanceDetail.vue b/frontend/src/views/InstanceDetail.vue
index c9b3698761..1701ebf3f3 100644
--- a/frontend/src/views/InstanceDetail.vue
+++ b/frontend/src/views/InstanceDetail.vue
@@ -1,5 +1,5 @@
<template>
- <div class="px-6 space-y-2">
+ <div class="px-6 space-y-2 mb-4">
<ArchiveBanner v-if="instance.state === State.DELETED" />
<div class="flex items-center justify-between">