X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=rt%2Fshare%2Fhtml%2FElements%2FShowLink;h=35b26381a71167b17ed51ad506deff0e27343f23;hb=0ea23112cfa0d82738b0f08d60d90579721b7524;hp=8913a32fbc9ff8f8310d2ca43315da265c6e821b;hpb=43a06151e47d2c59b833cbd8c26d97865ee850b6;p=freeside.git diff --git a/rt/share/html/Elements/ShowLink b/rt/share/html/Elements/ShowLink index 8913a32fb..35b26381a 100644 --- a/rt/share/html/Elements/ShowLink +++ b/rt/share/html/Elements/ShowLink @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -45,11 +45,11 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} - + % if ($URI->IsLocal) { % my $member = $URI->Object; % my $has_name = UNIVERSAL::can($member, 'Name') || (UNIVERSAL::can($member, '_Accessible') && $member->_Accessible('Name', 'read')); -% if (UNIVERSAL::isa($member, "RT::Ticket")) { +% if (UNIVERSAL::isa($member, "RT::Ticket") and $member->CurrentUserHasRight('ShowTicket')) { % my $inactive = $member->QueueObj->IsInactiveStatus($member->Status); @@ -69,3 +69,12 @@ <%ARGS> $URI => undef + +<%INIT> +my $href = $URI->Resolver->HREF; +if ( $URI->IsLocal ) { + my $base = RT->Config->Get('WebBaseURL'); + # URI->rel doesn't contain the leading '/' + $href = '/' . URI->new($href)->rel($base); +} +