[Rt-commit] rt branch, 4.4/update-queue-hidden, created. rt-4.4.2-69-g18f496ee2

Craig Kaiser craig at bestpractical.com
Wed Feb 7 16:00:51 EST 2018


The branch, 4.4/update-queue-hidden has been created
        at  18f496ee22bc6096d1dbe15baec7a2614fb571a2 (commit)

- Log -----------------------------------------------------------------
commit 18f496ee22bc6096d1dbe15baec7a2614fb571a2
Author: Craig Kaiser <craig at bestpractical.com>
Date:   Mon Feb 5 14:50:19 2018 -0500

    Hide Queue if Requestor does not have right to see
    
    It is possible for a User to be a Requestor on a Ticket and not have the
    right to view the Tickets Queue. If this is the case, when editing
    basics the current Queue cannot be displayed as the dropdown value for
    Queue. Thus resulting in the next available Queue being submitted as the
    new Queue for the Ticket. This causes unwanted Queue changed to the
    Ticket.

diff --git a/share/html/Elements/SelectObject b/share/html/Elements/SelectObject
index 7a4ecdfc9..21f0e34f7 100644
--- a/share/html/Elements/SelectObject
+++ b/share/html/Elements/SelectObject
@@ -122,6 +122,14 @@ if ( not defined $session{$cache_key} and not $Lite ) {
                 };
             }
         }
+        if ( ref($object) eq 'RT::Queue' ) {
+            unless ($session{CurrentUser}->HasRight( Object => $object, Right => 'SeeQueue' )) {
+                push @{$session{$cache_key}{objects}}, {
+                    Id          => undef,
+                    Name        => 'Hidden Queue',
+                };
+            }
+        }
     }
 
     while (my $object = $collection->Next) {

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


More information about the rt-commit mailing list