Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(ids-api): Add feature flag for general mandate delegation type. #16182

Merged
merged 4 commits into from
Sep 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -189,13 +189,21 @@ export class DelegationsIncomingService {
}

if (types?.includes(AuthDelegationType.GeneralMandate)) {
delegationPromises.push(
this.delegationsIncomingCustomService.findAllAvailableGeneralMandate(
const isGeneralMandateDelegationEnabled =
await this.featureFlagService.getValue(
Features.isGeneralMandateDelegationEnabled,
false,
user,
clientAllowedApiScopes,
client.requireApiScopes,
),
)
)
if (isGeneralMandateDelegationEnabled) {
delegationPromises.push(
this.delegationsIncomingCustomService.findAllAvailableGeneralMandate(
user,
clientAllowedApiScopes,
client.requireApiScopes,
),
)
}
}

if (
Expand All @@ -220,7 +228,7 @@ export class DelegationsIncomingService {
const isLegalRepresentativeDelegationEnabled =
await this.featureFlagService.getValue(
Features.isLegalRepresentativeDelegationEnabled,
true,
false,
user,
)
if (isLegalRepresentativeDelegationEnabled) {
Expand Down
3 changes: 3 additions & 0 deletions libs/feature-flags/src/lib/features.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,9 @@ export enum Features {

// Legal represantative delegation type
isLegalRepresentativeDelegationEnabled = 'isLegalRepresentativeDelegationEnabled',

// General mandate delegation type
isGeneralMandateDelegationEnabled = 'isGeneralMandateDelegationEnabled',
}

export enum ServerSideFeature {
Expand Down
Loading