Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
Fix the PrincipalSelect by fetching member/principal list when preparing the context and fix the member status filter
天舟13997dbf9b12
diff --git a/frontend/src/components/PrincipalSelect.vue b/frontend/src/components/PrincipalSelect.vueindex 25144cc718..327b12805b 100644--- a/frontend/src/components/PrincipalSelect.vue+++ b/frontend/src/components/PrincipalSelect.vue@@ -87,11 +87,13 @@ export default {const store = useStore();const principalList = computed((): Principal[] => {- const list = store.getters["member/memberList"]().map(- (member: Member) => {+ const list = store.getters["member/memberList"]()+ .filter((member: Member) => {+ return member.status == "ACTIVE";+ })+ .map((member: Member) => {return member.principal;- }- );+ });// If system bot is the selected ID (e.g. when issue is created by the bot on observing new sql file),// Then we add system bot to the list so it can display properly.if (props.selectedId == SYSTEM_BOT_ID) {@@ -106,13 +108,12 @@ export default {}return (- item.status == "ACTIVE" &&// We write this way instead of props.allowedRoleList.includes(item.role)// is becaues isOwner/isDBA/isDeveloper has feature gate logic.- ((props.allowedRoleList.includes("OWNER") && isOwner(item.role)) ||- (props.allowedRoleList.includes("DBA") && isDBA(item.role)) ||- (props.allowedRoleList.includes("DEVELOPER") &&- isDeveloper(item.role)))+ (props.allowedRoleList.includes("OWNER") && isOwner(item.role)) ||+ (props.allowedRoleList.includes("DBA") && isDBA(item.role)) ||+ (props.allowedRoleList.includes("DEVELOPER") &&+ isDeveloper(item.role)));});});diff --git a/frontend/src/components/ProvideDashboardContext.vue b/frontend/src/components/ProvideDashboardContext.vueindex 98afc95632..987174d170 100644--- a/frontend/src/components/ProvideDashboardContext.vue+++ b/frontend/src/components/ProvideDashboardContext.vue@@ -19,6 +19,10 @@ export default {await store.dispatch("actuator/info");+ // Fetch member and principal list so PrincipalSelect can have the data.+ await store.dispatch("member/fetchMemberList");+ await store.dispatch("principal/fetchPrincipalList");+await store.dispatch("environment/fetchEnvironmentList");await Promise.all([