[Rt-commit] rt branch, 4.4-trunk, updated. rt-4.4.4-98-g30486256d1
? sunnavy
sunnavy at bestpractical.com
Thu Apr 23 14:43:28 EDT 2020
The branch, 4.4-trunk has been updated
via 30486256d17b0eceac05b0a9487b0604c1a2fae9 (commit)
from c3f9963a25d904dfd8d5839132cafb10a5548382 (commit)
Summary of changes:
share/html/Elements/Tabs | 3 ++-
share/html/Ticket/Elements/ShowSummary | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)
- Log -----------------------------------------------------------------
commit 30486256d17b0eceac05b0a9487b0604c1a2fae9
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 7a75b39d74..f6233c33fa 100644
--- a/share/html/Elements/Tabs
+++ b/share/html/Elements/Tabs
@@ -756,7 +756,8 @@ my $build_main_nav = sub {
my $actions = PageMenu()->child( actions => title => loc('Actions'), sort_order => 95 );
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 5aaacb1f87..ca66409da5 100644
--- a/share/html/Ticket/Elements/ShowSummary
+++ b/share/html/Ticket/Elements/ShowSummary
@@ -109,7 +109,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