Skip to content

Commit

Permalink
[FEATURE] Création du feature toggle FT_NEW_LEGAL_DOCUMENTS_VERSIONING (
Browse files Browse the repository at this point in the history
  • Loading branch information
pix-service-auto-merge authored Dec 9, 2024
2 parents 0aa209e + 2f84c45 commit 508fffa
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 2 deletions.
5 changes: 5 additions & 0 deletions api/sample.env
Original file line number Diff line number Diff line change
Expand Up @@ -846,6 +846,11 @@ TEST_REDIS_URL=redis://localhost:6379
# default: false
# FT_SELF_ACCOUNT_DELETION=false

# Enable legal documents versioning
# type: boolean
# default: false
# FT_NEW_LEGAL_DOCUMENTS_VERSIONING=false

# =====
# CPF
# =====
Expand Down
2 changes: 2 additions & 0 deletions api/src/shared/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,7 @@ const configuration = (function () {
isSelfAccountDeletionEnabled: toBoolean(process.env.FT_SELF_ACCOUNT_DELETION),
isQuestEnabled: toBoolean(process.env.FT_ENABLE_QUESTS),
isTextToSpeechButtonEnabled: toBoolean(process.env.FT_ENABLE_TEXT_TO_SPEECH_BUTTON),
isLegalDocumentsVersioningEnabled: toBoolean(process.env.FT_NEW_LEGAL_DOCUMENTS_VERSIONING),
setupEcosystemBeforeStart: toBoolean(process.env.FT_SETUP_ECOSYSTEM_BEFORE_START) || false,
showExperimentalMissions: toBoolean(process.env.FT_SHOW_EXPERIMENTAL_MISSIONS),
showNewCampaignPresentationPage: toBoolean(process.env.FT_SHOW_NEW_CAMPAIGN_PRESENTATION_PAGE),
Expand Down Expand Up @@ -443,6 +444,7 @@ const configuration = (function () {
config.featureToggles.isQuestEnabled = false;
config.featureToggles.isAsyncQuestRewardingCalculationEnabled = false;
config.featureToggles.isTextToSpeechButtonEnabled = false;
config.featureToggles.isLegalDocumentsVersioningEnabled = false;
config.featureToggles.showNewResultPage = false;
config.featureToggles.showExperimentalMissions = false;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ describe('Acceptance | Shared | Application | Controller | feature-toggle', func
'is-quest-enabled': false,
'is-self-account-deletion-enabled': false,
'is-text-to-speech-button-enabled': false,
'is-legal-documents-versioning-enabled': false,
'setup-ecosystem-before-start': false,
'show-experimental-missions': false,
'show-new-campaign-presentation-page': false,
Expand Down
6 changes: 4 additions & 2 deletions orga/app/models/feature-toggle.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import Model from '@ember-data/model';
import Model, { attr } from '@ember-data/model';

export default class FeatureToggle extends Model {}
export default class FeatureToggle extends Model {
@attr('boolean') isLegalDocumentsVersioningEnabled;
}

0 comments on commit 508fffa

Please sign in to comment.