[Rt-commit] rt branch, 4.4/user-info, repushed
Craig Kaiser
craig at bestpractical.com
Tue Sep 4 16:57:49 EDT 2018
The branch 4.4/user-info was deleted and repushed:
was 3839ad29775d980125036306f5c379022fb5dce5
now 623935bb38fddeead83ad26bc59d9a2ebf489712
1: 180df032f = 1: 180df032f Add column map for transaction content
2: b131c0033 = 2: b131c0033 Add helper file for TSV exporting data
3: 757c3c3ba = 3: 757c3c3ba Set current search result TSV link to use helper file
4: 9a8f0ccda ! 4: f556ebd7d Add portlet for user information
@@ -61,53 +61,35 @@
+%# those contributions and any derivatives thereof.
+%#
+%# END BPS TAGGED BLOCK }}}
-+<div class="modal" id="user-info-modal">
-+ <p>Are you sure you want to update <% $count %> attachment records to remove <% $user->EmailAddress ? $user->EmailAddress : $user_name %></p>
-+ <a href="?id=<% $id %>&UserId=<% $id %>&Anonymize=1"><button>Ok</button></a>
-+ <a href="#" rel="modal:close"><button>Cancel</button></a>
-+</div>
++% if ( $UserObj->Id ) {
+<&|/Widgets/TitleBox,
+ class => 'user-related-info',
+ title => loc("User related info"),
+&>
-+
-+<div class="row">
-+ <div class="col-md-12">
-+ <a href="/Helpers/TSVExport?Type=User&UserId=<% $UserId %>"><button>Download My User Info</button></a>
-+ <a href="/Helpers/TSVExport?<% $query_tickets %>"><button>Download My Tickets</button></a>
-+ <a href="/Helpers/TSVExport?Type=Transaction&UserId=<% $UserId %>"><button>Download My Transaction Info</button></a>
-+
-+ <a href="#user-info-modal" rel="modal:open"><button>Anonymize User</button></a>
-+ <a href="/Admin/Tools/Shredder/index.html?Plugin=Users&Objects%3Alimit=&Objects%3AACE=&Objects%3AAttachment=&Objects%3ACachedGroupMember=&Objects%3ACustomField=&Objects%3ACustomFieldValue=&Objects%3AGroupMember=&Objects%3AGroup=&Objects%3ALink=&Objects%3APrincipal=&Objects%3AQueue=&Objects%3AScrip=&Objects%3AScripAction=&Objects%3AScripCondition=&Objects%3ATemplate=&Objects%3AObjectCustomFieldValue=&Objects%3ATicket=&Objects%3ATransaction=&Objects%3AUser=&Attachments%3Alimit=&Attachments%3Afiles_only=&Attachments%3Afile=&Attachments%3Alonger=&Users%3Alimit=&Users%3Astatus=Enabled&Users%3Aname=<% $user_name %>&Users%3Aemail=&Users%3Amember_of=&Users%3Anot_member_of=&Users%3Areplace_relations=<% $user_name %>&Users%3Ano_tickets=&Users%3Ano_ticket_transactions=&Tickets%3Alimit=&Tickets%3Aquery=&Tickets%3Awith_linked=&Tickets%3Aapply_query_to_linked=&Search=Search"><button>Replace User Information</button></a>
-+ <a href="/Admin/Tools/Shredder/index.html?Plugin=Users&Objects%3Alimit=&Objects%3AACE=&Objects%3AAttachment=&Objects%3ACachedGroupMember=&Objects%3ACustomField=&Objects%3ACustomFieldValue=&Objects%3AGroupMember=&Objects%3AGroup=&Objects%3ALink=&Objects%3APrincipal=&Objects%3AQueue=&Objects%3AScrip=&Objects%3AScripAction=&Objects%3AScripCondition=&Objects%3ATemplate=&Objects%3AObjectCustomFieldValue=&Objects%3ATicket=&Objects%3ATransaction=&Objects%3AUser=&Users%3Alimit=&Users%3Astatus=enabled&Users%3Aname=<% $user_name %>&Users%3Aemail=&Users%3Amember_of=&Users%3Anot_member_of=&Users%3Areplace_relations=&Users%3Ano_tickets=&Users%3Ano_ticket_transactions=&Attachments%3Alimit=&Attachments%3Afiles_only=&Attachments%3Afile=&Attachments%3Alonger=&Tickets%3Alimit=&Tickets%3Aquery=&Tickets%3Awith_linked=&Tickets%3Aapply_query_to_linked=&Search=Search"><button>Remove User Information</button></a>
-+ </div>
-+</div>
++<table>
++ <tr>
++ <td class="label"><&|/l&>Download CSV file of all user info stored on RT</&>:</td>
++ <td class="value"><a href="/Helpers/TSVExport?Type=User&UserId=<% $UserObj->Id %>" class="button">Info</a></td>
++ </tr><tr>
++ <td class="label"><&|/l&>Download CSV of tickets user is a requestor on</&>:</td>
++ <td class="value"><a href="/Helpers/TSVExport?<% $query_tickets %>" class="button">Tickets</a></td>
++ </tr><tr>
++ <td class="label"><&|/l&>Download CSV of transactions created by user</&>:</td>
++ <td class="value"><a href="/Helpers/TSVExport?Type=Transaction&UserId=<% $UserObj->Id %>" class="button">Transactions</a></td>
++ </tr>
++</table>
+</&>
-+<%init>
-+my $user_name;
-+my $user = RT::User->new($session{'CurrentUser'});
-+if ( $UserId ) {
-+ $user->Load( $UserId );
-+} else {
-+ $user->Load($session{'CurrentUser'});
-+}
-+
-+$user_name = $user->Name;
++% }
++<%INIT>
++my $query_tickets;
+
+# Build Ticket Query
-+my $query_tickets = "Query=Requestor.id = " . $user->Id;
-+
-+# Number of records that will be Anonymized
-+my $count = 0;
-+foreach my $method ( qw(Creator LastUpdatedBy) ) {
-+ next unless $user->_Accessible( $method => 'read' );
-+ $count += 1;
++if ( $UserObj->Id ) {
++ $query_tickets = "Query=Requestor.id = " . $UserObj->Id;
+}
-+</%init>
++</%INIT>
+
+<%ARGS>
-+$Anonymize => undef
-+$UserId => undef
-+$id => undef
++$UserObj
+</%ARGS>
5: 3839ad297 < -: ------- Add user info portlet to Admin/User/Modify
-: ------- > 5: 623935bb3 Add user info portlet to Admin/User/Modify
More information about the rt-commit
mailing list