Skip to content
  • sunnavy's avatar
    fix the logic of RT::Ticket::CurrentUserCanSetOwner for Take/Steal types · b314742a
    sunnavy authored
    previously, as long as user has ReassignTicket, RT::Ticket::CurrentUserCanSetOwner
    would return true for both "Take" and "Steal" types no matter what the ticket's
    current owner is, which is not good, as we want to use it like(in /Elements/Tabs):
    
        my ($can_take, $msg) = $ticket->CurrentUserCanSetOwner( Type => 'Take' );
        if ( $can_take ) {
            # show "Take" link
        }
    
    this commit merges the logic of "check ticket's current owner too" for Take/Steal
    into RT::Ticket::CurrentUserCanSetOwner.
    
    see also #28211
    b314742a