-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
153 changed files
with
1,648 additions
and
2,589 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
19.0 | ||
21.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
...java/fr/dossierfacile/api/front/config/featureflipping/PartnerAccessRevocationToggle.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package fr.dossierfacile.api.front.config.featureflipping; | ||
|
||
import fr.dossierfacile.common.utils.DateBasedFeatureToggle; | ||
import org.springframework.beans.factory.annotation.Value; | ||
import org.springframework.stereotype.Component; | ||
|
||
@Component | ||
// TODO delete after activation | ||
public class PartnerAccessRevocationToggle extends DateBasedFeatureToggle { | ||
|
||
public PartnerAccessRevocationToggle(@Value("${toggle.partners.revocation.activation.date:}") String activationDate) { | ||
super(activationDate); | ||
} | ||
|
||
} |
56 changes: 56 additions & 0 deletions
56
...ain/java/fr/dossierfacile/api/front/config/featureflipping/VersionedCategoriesMapper.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
package fr.dossierfacile.api.front.config.featureflipping; | ||
|
||
import fr.dossierfacile.api.front.security.interfaces.ClientAuthenticationFacade; | ||
import fr.dossierfacile.common.enums.DocumentCategory; | ||
import fr.dossierfacile.common.enums.DocumentSubCategory; | ||
import fr.dossierfacile.common.mapper.CategoriesMapper; | ||
import lombok.AllArgsConstructor; | ||
import org.springframework.context.annotation.Primary; | ||
import org.springframework.stereotype.Component; | ||
|
||
import java.util.Optional; | ||
|
||
import static fr.dossierfacile.common.enums.DocumentSubCategory.CERTIFICATE_VISA; | ||
import static fr.dossierfacile.common.enums.DocumentSubCategory.OTHER_IDENTIFICATION; | ||
|
||
@Primary | ||
@Component | ||
@AllArgsConstructor | ||
public class VersionedCategoriesMapper implements CategoriesMapper { | ||
|
||
private final ClientAuthenticationFacade clientAuthenticationFacade; | ||
|
||
@Override | ||
public DocumentCategory mapCategory(DocumentCategory category) { | ||
Optional<Integer> version = clientAuthenticationFacade.getApiVersion(); | ||
if (version.isPresent() && version.get() < 3) { | ||
return hideCategoriesIntroducedInV3(category); | ||
} | ||
return category; | ||
} | ||
|
||
@Override | ||
public DocumentSubCategory mapSubCategory(DocumentSubCategory subCategory) { | ||
Optional<Integer> version = clientAuthenticationFacade.getApiVersion(); | ||
if (version.isPresent() && version.get() < 3) { | ||
return hideSubCategoriesIntroducedInV3(subCategory); | ||
} | ||
return subCategory; | ||
} | ||
|
||
private DocumentCategory hideCategoriesIntroducedInV3(DocumentCategory category) { | ||
if (category == DocumentCategory.GUARANTEE_PROVIDER_CERTIFICATE) { | ||
return DocumentCategory.IDENTIFICATION; | ||
} | ||
return category; | ||
} | ||
|
||
private DocumentSubCategory hideSubCategoriesIntroducedInV3(DocumentSubCategory subCategory) { | ||
return switch (subCategory) { | ||
case FRANCE_IDENTITE -> OTHER_IDENTIFICATION; | ||
case VISALE, OTHER_GUARANTEE -> CERTIFICATE_VISA; | ||
default -> subCategory; | ||
}; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 0 additions & 17 deletions
17
...le-api-tenant/src/main/java/fr/dossierfacile/api/front/model/tenant/EmailExistsModel.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.