[Rt-commit] rt branch, 4.4/remove-user-info, repushed
Craig Kaiser
craig at bestpractical.com
Thu Sep 13 13:49:10 EDT 2018
The branch 4.4/remove-user-info was deleted and repushed:
was b90d7c4fce68928fa131b1f97d9e84bd7d0e5c74
now 8bdcc0d6269d8e71af197aa60037ad7814df4393
1: 846aad444 < -: ------- Allow rt-setup-fulltext-index to prompt for dba password
2: 2626be861 < -: ------- Fix typo in POD
3: 03a365485 < -: ------- Improve message when applying/removing custom roles from queues
4: 1e38d70cb < -: ------- Add GenerateAnonymousName function for RT::User
-: ------- > 1: a7fd1de33 Add GenerateAnonymousName function for RT::User
5: 814480b46 ! 2: 564f46e60 Create method AnonymizeUser in User.pm
@@ -9,9 +9,34 @@
--- a/lib/RT/User.pm
+++ b/lib/RT/User.pm
@@
- return 'anon_' . $name;
+ }
}
++=head2 GenerateAnonymousName INT
++
++Generate a random username proceeded by 'anon_' and then a
++random string, Returns the AnonymousName string. The length of the
++random string can be set by providing an integer for character length.
++
++=cut
++
++sub GenerateAnonymousName {
++ my $self = shift;
++ my $length = shift;
++
++ my $invalid = 1;
++ my $name = '';
++
++ while ( $invalid ) {
++ my @Chars = ('a'..'z', 'A'..'Z', '0'..'9');
++ for (1..$length || 9) {
++ $name .= $Chars[int rand @Chars];
++ }
++ $invalid = !$self->ValidateName('anon_' . $name);
++ }
++ return 'anon_' . $name;
++}
++
+=head2 AnonymizeUser { clear_customfields }
+
+Remove all personal identifying information on the user record, but keep
6: 61a2dbd9e = 3: c208a640f Create modal mason component
7: a35c9b423 = 4: 08a4469b6 Create portlet for removing user information
8: e4e88fe8f = 5: d6f82db78 Add remove user info portlet to user modify page
9: b90d7c4fc = 6: 8bdcc0d62 Create test for remove user information
More information about the rt-commit
mailing list