[Rt-commit] rt branch, 4.2-trunk, updated. rt-4.2.16-4-gcc03b490af
? sunnavy
sunnavy at bestpractical.com
Thu Apr 23 14:55:09 EDT 2020
The branch, 4.2-trunk has been updated
via cc03b490af32328d1d3d7e805383ace89420f456 (commit)
from c412bce5f345a61cb12056be0ce2795ddcd4f431 (commit)
Summary of changes:
share/html/Elements/Tabs | 3 ++-
share/html/Ticket/Elements/ShowSummary | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)
- Log -----------------------------------------------------------------
commit cc03b490af32328d1d3d7e805383ace89420f456
Author: michel <michel at bestpractical.com>
Date: Fri Mar 20 19:41:10 2020 +0100
Bug fix: use the right CurrentUserCanSetOwner return value.
CurrentUserCanSetOwner returns ($ok, $msg), not a boolean.
diff --git a/share/html/Elements/Tabs b/share/html/Elements/Tabs
index 45f0fbee7e..a6a70e35c2 100644
--- a/share/html/Elements/Tabs
+++ b/share/html/Elements/Tabs
@@ -637,7 +637,8 @@ my $build_main_nav = sub {
$tabs->child( history => title => loc('History'), path => "/Ticket/History.html?id=" . $id );
my %can = %{ $obj->CurrentUser->PrincipalObj->HasRights( Object => $obj ) };
- $can{'_ModifyOwner'} = $obj->CurrentUserCanSetOwner();
+ # since CurrentUserCanSetOwner returns ($ok, $msg), the parens ensure that $can{} gets $ok
+ ( $can{'_ModifyOwner'} ) = $obj->CurrentUserCanSetOwner();
my $can = sub {
unless ($_[0] eq 'ExecuteCode') {
return $can{$_[0]} || $can{'SuperUser'};
diff --git a/share/html/Ticket/Elements/ShowSummary b/share/html/Ticket/Elements/ShowSummary
index e0b9e913b1..7e8bf6e1ac 100644
--- a/share/html/Ticket/Elements/ShowSummary
+++ b/share/html/Ticket/Elements/ShowSummary
@@ -108,7 +108,7 @@ $Attachments => undef
<%INIT>
my $can_modify = $Ticket->CurrentUserHasRight('ModifyTicket');
my $can_modify_cf = $Ticket->CurrentUserHasRight('ModifyCustomField');
-my $can_modify_owner = $Ticket->CurrentUserCanSetOwner();
+my ($can_modify_owner) = $Ticket->CurrentUserCanSetOwner();
my $can_modify_people = $Ticket->CurrentUserHasRight('Watch')
|| $Ticket->CurrentUserHasRight('WatchAsAdminCc');
</%INIT>
-----------------------------------------------------------------------
More information about the rt-commit
mailing list