mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-04-30 18:08:34 +08:00
When a site has the `must_approve_users` setting enabled, new user data is stored on the Reviewable model, including username, email, and any other data that is entered during signup. If the user is rejected, that data is retained, without a clear path to deleting it. In order to allow data that could be PII to be removed, without breaking Discourse's audit and logging trails, this change scrubs the PII from the relevant `ReviewableUser` and `UserHistory` objects, replacing that data with who scrubbed it, and why.
19 lines
417 B
Ruby
19 lines
417 B
Ruby
# frozen_string_literal: true
|
|
|
|
module PageObjects
|
|
module Modals
|
|
class ScrubRejectedUser < PageObjects::Modals::Base
|
|
def modal
|
|
find(".admin-scrub-rejected-user-modal")
|
|
end
|
|
|
|
def fill_in_scrub_reason(reason)
|
|
modal.find("input#scrub-reason").fill_in(with: reason)
|
|
end
|
|
|
|
def scrub_button
|
|
modal.find(".d-modal__footer .btn.btn-danger")
|
|
end
|
|
end
|
|
end
|
|
end
|