[Rt-commit] rt branch, 4.0-trunk, updated. rt-4.0.19-40-g5161fe0

Kevin Falcone falcone at bestpractical.com
Thu Feb 13 18:18:33 EST 2014


The branch, 4.0-trunk has been updated
       via  5161fe003ef41485df10eaf96ba022c65e23ca7d (commit)
       via  5445a1ea0b9cdd6dee6e33891aa9aab67b0b91fc (commit)
      from  cff2773674018de554ae69f410893038ef9ed750 (commit)

Summary of changes:
 share/html/Elements/ShowLink | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

- Log -----------------------------------------------------------------
commit 5445a1ea0b9cdd6dee6e33891aa9aab67b0b91fc
Author: Christian Loos <cloos at netcologne.de>
Date:   Wed Feb 12 14:46:05 2014 +0100

    fix ticket link name without rights on target ticket
    
    If you have ticket 1 which is linked to ticket 2 and the user doesn't have
    rights for ticket 2 the link is:
    1: [] (owner ticket 2)
    The ticket 2 subject and status isn't displayed because the rights check
    but the ticket 2 owner is displayed without any rights check.
    
    Also, if ticket 2 status is closed the class of the span element of the
    link isn't set to 'ticket-inactive' because the ticket 2 status value
    isn't accessible for the user.
    
    With this commit the link name would fall back to $URI->AsString which shows
    only the ticket id (the subject isn't shown in this case).

diff --git a/share/html/Elements/ShowLink b/share/html/Elements/ShowLink
index cccc3d8..35b2638 100644
--- a/share/html/Elements/ShowLink
+++ b/share/html/Elements/ShowLink
@@ -49,7 +49,7 @@
 % 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);
 
 <span class="<% $inactive ? 'ticket-inactive' : '' %>">

commit 5161fe003ef41485df10eaf96ba022c65e23ca7d
Merge: cff2773 5445a1e
Author: Kevin Falcone <falcone at bestpractical.com>
Date:   Thu Feb 13 18:17:57 2014 -0500

    Merge branch '4.0/ticket-link-without-rights' into 4.0-trunk


-----------------------------------------------------------------------


More information about the rt-commit mailing list