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

[Feature] Exclude properties from anonimisation #61

Open
revoltek-daniel opened this issue Feb 8, 2024 · 1 comment
Open

[Feature] Exclude properties from anonimisation #61

revoltek-daniel opened this issue Feb 8, 2024 · 1 comment
Labels
answered question Further information is requested

Comments

@revoltek-daniel
Copy link

Is your feature request related to a problem? Please describe.
We only want to anonymise the customer object but keep the Order for compliance reasons

Describe the solution you'd like
An attribute or configuration in the yaml file to exclude a property/object from anonimisation.
Or handle the stop state of events after they are called.
Or add a try catch block to let me throw an exception to stop further execution when the object is being handled.

Describe alternatives you've considered
I've tried using the events but I can't find a way to cancel the execution.

@maxperei
Copy link
Member

maxperei commented Mar 6, 2024

hello @revoltek-daniel, actually it is already possible to exclude some entities from being anonymized, for instance if you want to ignore orders you have to define explicitely a mapping in your config folder

# {{projectDir}}/config/packages/synolia_sylius_gdpr.yml
synolia_sylius_gdpr:
   anonymization:
       mappings:
           paths:
               - '%kernel.project_dir%/config/gdpr'

when mappings.paths is directly pointing towards your entities configuration :

# {{projectDir}}/config/gdpr/order.yml
Sylius\Component\Core\Model\Order:
    properties:
        shippingAddress: ~
        billingAddress: ~
        payments: ~
        currencyCode: ~
        localeCode: ~
        customerIp: ~
        notes: ~

btw, ANONYMIZE_CONFIGURATION.md is giving you an exhaustive list of properties you can utilize

nb: this plugin also let you use phpdoc annotations if this is more convenient

please let us know if this answer is what you expected..

@oallain oallain added question Further information is requested answered labels Mar 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
answered question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants