[Rt-commit] r5061 - in rt/branches/3.5-TESTING: html/Ticket/Elements

jesse at bestpractical.com jesse at bestpractical.com
Mon Apr 24 11:07:25 EDT 2006


Author: jesse
Date: Mon Apr 24 11:07:22 2006
New Revision: 5061

Modified:
   rt/branches/3.5-TESTING/   (props changed)
   rt/branches/3.5-TESTING/html/Ticket/Elements/ShowRequestor

Log:
 r11845 at hualien:  jesse | 2006-04-24 11:06:51 -0400
 On the Ticket page, if you click on the "More about Requestor" link, you
 get to the Admin/Users/Modify.html page, but if you don't have the
 AdminUsers privilege, you only get a blank page.
 
 This patch removes the link if the user doesn't have that privilege.
 
 David Schweikert        | phone: +41 44 632 7019
 System manager ISG.EE   | walk:  ETH Zentrum, ETL F24.1
 ETH Zurich, Switzerland | web:   http://people.ee.ethz.ch/dws
 


Modified: rt/branches/3.5-TESTING/html/Ticket/Elements/ShowRequestor
==============================================================================
--- rt/branches/3.5-TESTING/html/Ticket/Elements/ShowRequestor	(original)
+++ rt/branches/3.5-TESTING/html/Ticket/Elements/ShowRequestor	Mon Apr 24 11:07:22 2006
@@ -49,6 +49,7 @@
 while (my $requestor=$people->Next) {
 my $name=$requestor->RealName || $requestor->EmailAddress;	
 my $tickets = RT::Tickets->new($session{'CurrentUser'});
+my $has_right_adminusers = $session{'CurrentUser'}->HasRight(Object => $RT::System, Right => 'AdminUsers');
 $tickets->LimitWatcher(TYPE => 'Requestor', VALUE => $requestor->EmailAddress );
 $tickets->LimitStatus( VALUE => 'open');
 $tickets->LimitStatus( VALUE => 'new');
@@ -58,7 +59,7 @@
 </%PERL>
 
 % unless ($requestor->Privileged) {
-<&| /Widgets/TitleBox, title_href => "$RT::WebPath/Admin/Users/Modify.html?id=".$requestor->id, title=> loc("More about [_1]", $name) &>
+<&| /Widgets/TitleBox, title_href => $has_right_adminusers ? "$RT::WebPath/Admin/Users/Modify.html?id=".$requestor->id : undef, title=> loc("More about [_1]", $name) &>
 
 %# Additional information about this user.  Empty by default.
 <& /Elements/Callback, _CallbackName => 'AboutThisUser', requestor => $requestor, %ARGS &>


More information about the Rt-commit mailing list