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

AO3-6015 Script to get data for guests #4997

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

brianjaustin
Copy link
Member

@brianjaustin brianjaustin commented Dec 20, 2024

Pull Request Checklist

Issue

https://otwarchive.atlassian.net/browse/AO3-6015

Purpose

Adds a script to get data for guests/deleted users by email (i.e. for GDPR reasons)

Credit

sarken, for the majority of the script
Brian Austin, for some YAML stuff to handle audit entries properly

@brianjaustin brianjaustin changed the title AO3-6015 Script to get data for deleted users AO3-6015 Script to get data for guests Dec 21, 2024
audits&.rows&.each do |audit|
action = audit[8]
changes = YAML.safe_load(audit[9],
permitted_classes: [ActiveSupport::TimeWithZone, Time, ActiveSupport::TimeZone, BCrypt::Password],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can replace this list with Rails.application.config.active_record.yaml_column_permitted_classes.

config.active_record.yaml_column_permitted_classes = [
ActiveSupport::TimeWithZone,
Time,
ActiveSupport::TimeZone,
BCrypt::Password
]

case k
when "accepted_tos_version"
ips << ip if ip.present?
# Changed email address
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the comments are indented like this, can you move them into the next block, e.g. # Changed email address under when "email"?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants