[Rt-commit] rt branch, 4.4/remove-user-info, repushed
Craig Kaiser
craig at bestpractical.com
Fri Jun 15 14:12:54 EDT 2018
The branch 4.4/remove-user-info was deleted and repushed:
was 4a61058d4b757fafb01ac3384dfb67555b89e6ba
now ff1ceccc5bd3b310dcb81daeeb054a293f56e306
1: 92aa5d684 < -: ------- Add keyboard shortcuts for reply and comment
2: b6b2777f9 < -: ------- Allow rt-setup-fulltext-index to prompt for dba password
3: 0c8b88190 < -: ------- Fix typo in POD
4: d8f98d488 ! 1: 8b6402eb0 Add GenerateAnonymousName function for RT::User
@@ -4,7 +4,8 @@
The GenerateAnonymousName function will return a random valid (unique)
username with the format 'anon_1234abcd' where after 'anon_' is a random
- string.
+ string. Specify length of the random string by providing int value to
+ function.
diff --git a/lib/RT/User.pm b/lib/RT/User.pm
--- a/lib/RT/User.pm
5: 628af98ad ! 2: 1a5f99e25 Create method AnonymizeUser in User.pm
@@ -2,7 +2,7 @@
Create method AnonymizeUser in User.pm
- Create a subroutine 'AnonymizeUser' that will remove the personal
+ Create method 'AnonymizeUser' that will remove the personal
identifying information from a user record, but keep the record alive.
diff --git a/lib/RT/User.pm b/lib/RT/User.pm
6: ab756f373 ! 3: 0f47bb18f Create portlet for removing user information
@@ -4,11 +4,14 @@
Mason template that has three buttons for removing user information. The
buttons are 'Anonymize user', 'Replace User' and 'Remove User'.
+ Anonymize user will call the 'AnonymizeUser' method to clear identifying
+ information from the user record. 'Replace User' and 'Remove User' will
+ link to the shredder page with a pre formatted search.
-diff --git a/share/html/Elements/UserRelatedInfo b/share/html/Elements/UserRelatedInfo
+diff --git a/share/html/Elements/MyRelatedInfo b/share/html/Elements/MyRelatedInfo
new file mode 100644
--- /dev/null
-+++ b/share/html/Elements/UserRelatedInfo
++++ b/share/html/Elements/MyRelatedInfo
@@
+%# BEGIN BPS TAGGED BLOCK {{{
+%#
@@ -58,16 +61,16 @@
+%#
+%# END BPS TAGGED BLOCK }}}
+<div class="modal" id="user-info-modal" align="center">
-+ <form name="anonymize_user_form" method="GET" action="/Admin/Users/Modify.html">
-+ <p>Are you sure you want to anonymize user: <% $UserObj->Name %>?</p>
++ <form id="anonymize_user_form" method="GET" action="/Admin/Users/Modify.html">
++ <p>Are you sure you want to anonymize user: <% $session{'CurrentUser'}->Name %>?</p>
+ <p>
+ Check to clear user customfields:
+ <input name="clear_customfields" type="checkbox" class="checkbox">
+ </p>
+
-+ <button type="submit" class="button">Ok</button>
-+ <a href="#" rel="modal:close" class="button">Cancel</a>
-+ <input type="hidden" name="id" value="<% $UserObj->id %>">
++ <button type="submit" class="button"><&|/l&>Ok</&></button>
++ <a href="#" rel="modal:close" class="button"><&|/l&>Cancel</&></a>
++ <input type="hidden" name="id" value="<% $session{'CurrentUser'}->id %>">
+ <input type="hidden" name="Anonymize" value=1>
+ </form>
+</div>
@@ -78,14 +81,10 @@
+
+<div>
+ <div>
-+ <a href="#user-info-modal" rel="modal:open" class="button" name="anonymize_user">Anonymize User</a>
-+ <a href="/Admin/Tools/Shredder/index.html?Plugin=Users&Users%3Astatus=enabled&Users%3Aname=<% $UserObj->Name %>&Users%3Areplace_relations=nobody&Search=Search" name="replace-user" class="button">Replace User Information</a>
-+ <a href="/Admin/Tools/Shredder/index.html?Plugin=Users&Users%3Astatus=enabled&Users%3Aname=<% $UserObj->Name %>&Search=Search&remove_user" class="button" name="remove-user">Remove User Information</a>
++ <a href="#user-info-modal" rel="modal:open" class="button" name="anonymize_user"><&|/l&>Anonymize User</&></a>
++ <a href="/Admin/Tools/Shredder/index.html?Plugin=Users&Users%3Astatus=enabled&Users%3Aname=<% $session{'CurrentUser'}->Name %>&Users%3Areplace_relations=nobody&Search=Search" name="replace-user" class="button"><&|/l&>Replace User Information</&></a>
++ <a href="/Admin/Tools/Shredder/index.html?Plugin=Users&Users%3Astatus=enabled&Users%3Aname=<% $session{'CurrentUser'}->Name %>&Search=Search&remove_user" class="button" name="remove-user"><&|/l&>Remove User Information</&></a>
+ </div>
+</div>
+</&>
-+
-+<%ARGS>
-+$UserObj => undef
-+</%ARGS>
7: ca2428c81 ! 4: 5e8f01c1d Add remove user info portlet to user modify page
@@ -1,6 +1,6 @@
Author: Craig Kaiser <craig at bestpractical.com>
- Add portlet to user admin modify page
+ Add remove user info portlet to user modify page
diff --git a/share/html/Admin/Users/Modify.html b/share/html/Admin/Users/Modify.html
--- a/share/html/Admin/Users/Modify.html
@@ -9,7 +9,7 @@
% }
</form>
-+<& /Elements/UserRelatedInfo, UserObj => $UserObj &>
++<& /Elements/MyRelatedInfo &>
+
<%INIT>
8: 4a61058d4 < -: ------- Create test for remove user information
-: ------- > 5: ff1ceccc5 Create test for remove user information
More information about the rt-commit
mailing list