diff --git a/packages/manager/modules/hub/src/components/kyc-fraud-banner/kyc-fraud-banner.constants.js b/packages/manager/modules/hub/src/components/kyc-fraud-banner/kyc-fraud-banner.constants.js index c63a99688680..88113d111389 100644 --- a/packages/manager/modules/hub/src/components/kyc-fraud-banner/kyc-fraud-banner.constants.js +++ b/packages/manager/modules/hub/src/components/kyc-fraud-banner/kyc-fraud-banner.constants.js @@ -4,6 +4,10 @@ export const FRAUD_STATUS = { REQUIRED: 'required', }; +export const FEATURES = { + proceduresFraud: 'procedures:fraud', +}; + const TRACK_IMPRESSION = { campaignId: 'kyc-fraud', creation: 'notification', diff --git a/packages/manager/modules/hub/src/components/kyc-fraud-banner/kyc-fraud-banner.controller.js b/packages/manager/modules/hub/src/components/kyc-fraud-banner/kyc-fraud-banner.controller.js index 21d79d62a2af..3376bd23d3b3 100644 --- a/packages/manager/modules/hub/src/components/kyc-fraud-banner/kyc-fraud-banner.controller.js +++ b/packages/manager/modules/hub/src/components/kyc-fraud-banner/kyc-fraud-banner.controller.js @@ -2,23 +2,35 @@ import { FRAUD_STATUS, TRACK_IMPRESSION_REQUIRED, TRACK_IMPRESSION_OPEN, + FEATURES, } from './kyc-fraud-banner.constants'; export default class KycFraudBannerController { /* @ngInject */ - constructor($http, $q, coreURLBuilder, atInternet) { + constructor($http, $q, coreURLBuilder, atInternet, ovhFeatureFlipping) { this.$http = $http; this.$q = $q; this.coreURLBuilder = coreURLBuilder; this.atInternet = atInternet; this.TRACK_IMPRESSION_REQUIRED = TRACK_IMPRESSION_REQUIRED; this.TRACK_IMPRESSION_OPEN = TRACK_IMPRESSION_OPEN; + this.ovhFeatureFlipping = ovhFeatureFlipping; } $onInit() { this.showRequiredBanner = false; this.showOpenBanner = false; + this.ovhFeatureFlipping + .checkFeatureAvailability(FEATURES.proceduresFraud) + .then((result) => { + if (result.isFeatureAvailable(FEATURES.proceduresFraud)) { + this.initFraud(); + } + }); + } + + initFraud() { this.documentLink = this.coreURLBuilder.buildURL( 'dedicated', '#/documents',