[Rt-commit] rtir branch, 5.0/abort-ticket-create-page-if-no-queue, created. 5.0.0beta1-1-g1ca859e5

Craig Kaiser craig at bestpractical.com
Wed Jul 1 15:17:28 EDT 2020


The branch, 5.0/abort-ticket-create-page-if-no-queue has been created
        at  1ca859e5a0508d3ea246a0ba8ccf005117dc8d1e (commit)

- Log -----------------------------------------------------------------
commit 1ca859e5a0508d3ea246a0ba8ccf005117dc8d1e
Author: craig kaiser <craig at bestpractical.com>
Date:   Wed Jul 1 14:19:30 2020 -0400

    Don't load first queue in queues cache on RTIR create page
    
    If no RTIR queue could be loaded prior then it is likely that the
    current user does not have rights to view the RTIR queues or they do not
    exist. That means grabbing the first queue in the queue cache will
    return an RT queue not an RTIR queue.

diff --git a/html/RTIR/Create.html b/html/RTIR/Create.html
index 7d738d4b..6dc78200 100644
--- a/html/RTIR/Create.html
+++ b/html/RTIR/Create.html
@@ -420,17 +420,6 @@ unless ($Queue) {
     }
 }
 
-# pick first in list in normal order unless queue provided from form/url/defaults
-unless ($Queue) {
-    my $cache_key = SetObjectSessionCache(
-        ObjectType       => 'Queue',
-        CheckRight       => 'CreateTicket',
-        CacheNeedsUpdate => RT->System->QueueCacheNeedsUpdate,
-    );
-
-    $Queue = $session{$cache_key}{objects}[0]->{Id};
-}
-
 my $QueueObj = RT::Queue->new( $session{'CurrentUser'} );
 $QueueObj->Load( $Queue );
 

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


More information about the rt-commit mailing list