Skip to content
This repository has been archived by the owner on Nov 22, 2023. It is now read-only.

Commit

Permalink
(PC-9275) : Add USER_PROFILING_FRAUD_CHECK feature flag
Browse files Browse the repository at this point in the history
  • Loading branch information
xordoquy committed Jun 22, 2021
1 parent 51389dc commit 39b6859
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
"""Add USER_PROFILING_FRAUD_CHECK feature flag
Revision ID: 2e918169bb66
Revises: 84706f806e3d
Create Date: 2021-06-21 07:39:28.931418
"""
from pcapi.models import feature


# revision identifiers, used by Alembic.
revision = "2e918169bb66"
down_revision = "84706f806e3d"
branch_labels = None
depends_on = None


FLAG = feature.FeatureToggle.USER_PROFILING_FRAUD_CHECK


def upgrade() -> None:
feature.add_feature_to_database(FLAG)


def downgrade() -> None:
feature.remove_feature_from_database(FLAG)
2 changes: 2 additions & 0 deletions src/pcapi/models/feature.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ class FeatureToggle(enum.Enum):
USE_APP_SEARCH_ON_NATIVE_APP = "Utiliser App Search au lieu d'Algolia sur l'app native"
USE_APP_SEARCH_ON_WEBAPP = "Utiliser App Search au lieu d'Algolia sur la webapp"
ID_CHECK_ADDRESS_AUTOCOMPLETION = "Autocomplétion de l'adresse lors du parcours IDCheck"
USER_PROFILING_FRAUD_CHECK = "Détection de la fraude basée sur le profil de l'utilisateur"


class Feature(PcObject, Model, DeactivableMixin):
Expand All @@ -79,6 +80,7 @@ def nameKey(self) -> str:
FeatureToggle.USE_APP_SEARCH_ON_NATIVE_APP,
FeatureToggle.USE_APP_SEARCH_ON_WEBAPP,
FeatureToggle.ID_CHECK_ADDRESS_AUTOCOMPLETION,
FeatureToggle.USER_PROFILING_FRAUD_CHECK,
)


Expand Down

0 comments on commit 39b6859

Please sign in to comment.