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

Craig Kaiser craig at bestpractical.com
Mon Feb 5 14:51:50 EST 2018


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

- Log -----------------------------------------------------------------
commit 3f4bab53919d7d30854b6a5dde0b1443f44c115e
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..799512707 100644
--- a/share/html/Elements/SelectObject
+++ b/share/html/Elements/SelectObject
@@ -122,6 +122,12 @@ if ( not defined $session{$cache_key} and not $Lite ) {
                 };
             }
         }
+        unless ($session{CurrentUser}->HasRight( Object => $object, Right => 'SeeQueue' )) {
+            push @{$session{$cache_key}{objects}}, {
+                Id          => undef,
+                Name        => 'Hidden Queue',
+            };
+        }
     }
 
     while (my $object = $collection->Next) {

commit 03782b673c293005841e8c765b7c2aab178e65b2
Author: Craig Kaiser <craig at bestpractical.com>
Date:   Mon Feb 5 14:50:51 2018 -0500

    Allow Ticket Queue change on Update page

diff --git a/share/html/Ticket/Update.html b/share/html/Ticket/Update.html
index 8b4ba94c2..e5938834a 100644
--- a/share/html/Ticket/Update.html
+++ b/share/html/Ticket/Update.html
@@ -106,6 +106,15 @@
                 Default      => $ARGS{'Owner'}
             }
         },
+        { name => 'Queue',
+            comp => '/Elements/SelectQueue',
+            args => {
+            Name => 'Queue',
+            TicketObj => $TicketObj,
+            Default => $TicketObj->QueueObj->Id,
+            ShowNullOption => 0,
+            }
+        },
         { special => 'roles' },
         {   name => 'Worked',
             comp => '/Elements/EditTimeValue',

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


More information about the rt-commit mailing list