hryvinskyi / magento2-gdpr-pack
Data-subject rights (GDPR) for Magento 2: export, erase and anonymise a shopper's personal data on request, with the request lifecycle, journal, e-mails, cron and command line, the admin screens, the storefront pages, the REST and GraphQL APIs, and providers for customers, orders, carts, newsletter
Package info
github.com/hryvinskyi/magento2-gdpr-pack
Type:metapackage
pkg:composer/hryvinskyi/magento2-gdpr-pack
Requires
- hryvinskyi/magento2-clock: 1.0.*
- hryvinskyi/magento2-document-export: 1.0.*
- hryvinskyi/magento2-gdpr: 1.0.*
- hryvinskyi/magento2-gdpr-admin-ui: 1.0.*
- hryvinskyi/magento2-gdpr-api: 1.0.*
- hryvinskyi/magento2-gdpr-frontend: 1.0.*
- hryvinskyi/magento2-gdpr-graph-ql: 1.0.*
- hryvinskyi/magento2-gdpr-newsletter: 1.0.*
- hryvinskyi/magento2-gdpr-review: 1.0.*
- hryvinskyi/magento2-gdpr-sales: 1.0.*
- hryvinskyi/magento2-gdpr-vault: 1.0.*
- hryvinskyi/magento2-gdpr-wishlist: 1.0.*
- hryvinskyi/magento2-rate-limit: 1.0.*
- magento/framework: *
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
Metapackage that installs the data-subject rights suite: a customer, a guest or a store operator exports, erases or anonymises the personal data a store holds about an account or an e-mail address. A request has a life of its own (confirmation for guests, a delay before anything is destroyed, a run, a retry), a respond-by date one calendar month after it was made, and a privacy action log that never holds personal data.
composer require hryvinskyi/magento2-gdpr-pack bin/magento setup:upgrade bin/magento setup:di:compile # production mode only bin/magento setup:static-content:deploy -f # production mode only bin/magento cache:flush
Run from the Magento root, with Magento Open Source or Adobe Commerce 2.4.8 or 2.4.9 and PHP 8.3 to 8.5. Magento refuses to enable a module while one it requires is disabled, so on a store that disabled modules by hand enable the suite's modules together: bin/magento module:enable Hryvinskyi_Clock Hryvinskyi_RateLimit Hryvinskyi_DocumentExport Hryvinskyi_Logger Hryvinskyi_AdminUi Hryvinskyi_ConfigurationFields Hryvinskyi_GdprApi Hryvinskyi_Gdpr Hryvinskyi_GdprSales Hryvinskyi_GdprNewsletter Hryvinskyi_GdprReview Hryvinskyi_GdprWishlist Hryvinskyi_GdprVault Hryvinskyi_GdprAdminUi Hryvinskyi_GdprFrontend Hryvinskyi_GdprGraphQl, before setup:upgrade.
It installs:
hryvinskyi/magento2-gdpr-api, the published contracts: the request, subject and journal data types, the services and the extension points.hryvinskyi/magento2-gdpr, the engine: the request life, the erasure rules, the export archive, the privacy action log, the e-mails, the cron jobs, the command line (gdpr:export,gdpr:erase,gdpr:run-scheduled) and the REST routes. It also holds the customer account and address entities.hryvinskyi/magento2-gdpr-sales, the orders (anonymised, never deleted) and the shopping carts, the guest's proof of an order, and the guests whose latest order is old.hryvinskyi/magento2-gdpr-newsletter,hryvinskyi/magento2-gdpr-review,hryvinskyi/magento2-gdpr-wishlistandhryvinskyi/magento2-gdpr-vault, one kind of data each. The last holds a customer's saved payment methods, exported without the gateway's token, and the persistent shopping session.hryvinskyi/magento2-gdpr-admin-ui, the settings, the requests grid, the privacy action log and the buttons on the customer page, the order view and the subscriber grid.hryvinskyi/magento2-gdpr-frontend, the Privacy Settings page in the customer account, the request form for guests and the pages behind the e-mailed links.hryvinskyi/magento2-gdpr-graph-ql, the GraphQL field and mutations.hryvinskyi/magento2-document-export,hryvinskyi/magento2-rate-limitandhryvinskyi/magento2-clock, three shared blocks the suite builds on: CSV, PDF and zip documents and private downloads, fixed-window limits, and one clock in the store's timezone.
After the install the storefront features are on and age-based anonymisation and the inactive-customer clean-up are off. To bring a store into use:
- Make sure Magento's cron runs. Requests are carried out by the cron group
hryvinskyi_gdpr, every five minutes by default. - Open Stores › Configuration › Hryvinskyi Extensions › Data Subject Rights (GDPR). Check the delay before an erase or an anonymise runs (60 minutes), the export formats and archive lifetime, the e-mail sender and templates, and the erasure rules for each kind of data.
- Give each admin role the resources it needs under System › Permissions › User Roles: the suite adds Customers › Data Subject Requests with a permission for each action.
- Check with a dry run, which changes nothing:
bin/magento gdpr:export --customer-id=<customer_id> --dry-run. - Behind a proxy, make Magento report the real client address; the guest form's limit counts per client address.
Each package's README describes its settings and limits.