fix(editor): Filter credentials by project ID also for new workflow (#9615)

This commit is contained in:
Csaba Tuncsik
2024-06-05 15:58:15 +02:00
committed by GitHub
parent e7f616290f
commit c92765dcdb
4 changed files with 164 additions and 11 deletions

View File

@@ -247,7 +247,10 @@ export const useCredentialsStore = defineStore(STORES.CREDENTIALS, {
const credentialTypes = await getCredentialTypes(rootStore.getBaseUrl);
this.setCredentialTypes(credentialTypes);
},
async fetchAllCredentials(projectId?: string): Promise<ICredentialsResponse[]> {
async fetchAllCredentials(
projectId?: string,
includeScopes = true,
): Promise<ICredentialsResponse[]> {
const rootStore = useRootStore();
const filter = {
@@ -257,6 +260,7 @@ export const useCredentialsStore = defineStore(STORES.CREDENTIALS, {
const credentials = await getAllCredentials(
rootStore.getRestApiContext,
isEmpty(filter) ? undefined : filter,
includeScopes,
);
this.setCredentials(credentials);
return credentials;