[Rt-commit] r5110 - in rt/branches/3.7-EXPERIMENTAL: .
ruz at bestpractical.com
ruz at bestpractical.com
Tue Apr 25 09:34:53 EDT 2006
Author: ruz
Date: Tue Apr 25 09:34:52 2006
New Revision: 5110
Modified:
rt/branches/3.7-EXPERIMENTAL/ (props changed)
rt/branches/3.7-EXPERIMENTAL/html/Ticket/Elements/ShowRequestor
Log:
r2425 at cubic-pc (orig r5061): jesse | 2006-04-24 19:07:22 +0400
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.7-EXPERIMENTAL/html/Ticket/Elements/ShowRequestor
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/html/Ticket/Elements/ShowRequestor (original)
+++ rt/branches/3.7-EXPERIMENTAL/html/Ticket/Elements/ShowRequestor Tue Apr 25 09:34:52 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,10 @@
</%PERL>
% unless ($requestor->Privileged) {
-<&| /Widgets/TitleBox, title_href => RT->Config->Get('WebPath')."/Admin/Users/Modify.html?id=".$requestor->id, title=> loc("More about [_1]", $name) &>
+<&| /Widgets/TitleBox,
+ title_href => $has_right_adminusers? RT->Config->Get('WebPath')."/Admin/Users/Modify.html?id=".$requestor->id: '',
+ 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