Open
Conversation
fa3e8ca to
b4cffea
Compare
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related issue(s)
Closes #940.
Detects inactive users to help complying with the GDPR, suggests the
admin to anonymize or delete them, and optionally applies the action
automatically.
A user is considered inactive when they only have authorizations of
type user (or none at all), and their last activity (or creation
date if they never had any) is older than APP_USERS_INACTIVITY_TIME
months (default 12).
Three commits, each one self-contained:
EntityEventRepository::findLastActivityAtForUser().
a warning paragraph on the user profile suggesting to act.
APP_USERS_INACTIVITY_AUTO (none by default).
A few decisions worth flagging:
N months, with a fallback on User.createdAt. Felt the most
semantically correct in a GDPR context. Open to your feedback.
self to ?self to allow auto-anonymization from the handler
(no authenticated user). The DB column was already nullable, this
just aligns the PHP signature with the schema.
can link to a single page where both anonymize and delete are
available. The existing modal entry in the show page Actions menu
is untouched.
How to test manually
Pre-requisites:
whose createdAt is older than APP_USERS_INACTIVITY_TIME months
(or set the variable to 1 in .env.local for faster tests).
Detection & display (Commit 2):
or delete them, linking to the edit page.
Anonymization (new) and Deletion (existing). Both trigger a
native browser confirm popup on submit.
redirected to the show page with the standard "anonymized by..."
message.
Auto-cleanup (Commit 3):
APP_USERS_INACTIVITY_AUTO=anonymize (or delete).
temporarily lower Schedule.php to every 1 minute).
(or deleted).
(or are removed if mode is delete).
is logged and no user is touched.
Reviewer checklist