Refs #2465 -- Introduce unique identifiers for authentication backends (#2466)

This commit is contained in:
Raphael Michel
2022-02-23 10:16:35 +01:00
committed by GitHub
parent 2bf5a0ce8a
commit d7acd2b6bf
6 changed files with 221 additions and 10 deletions

View File

@@ -162,10 +162,12 @@ class UserAnonymizeView(AdministratorPermissionRequiredMixin, RecentAuthenticati
self.object = get_object_or_404(User, pk=self.kwargs.get("id"))
self.object.log_action('pretix.user.anonymized',
user=request.user)
self.object.email = "{}@disabled.pretix.eu".format(self.object.pk)
self.object.email = "{}.{}@disabled.pretix.eu".format(self.object.pk, self.object.auth_backend)
self.object.fullname = ""
self.object.is_active = False
self.object.notifications_send = False
self.object.auth_backend = None
self.object.auth_backend_identifier = None
self.object.save()
for le in self.object.all_logentries.filter(action_type="pretix.user.settings.changed"):
d = le.parsed_data