From 0e240804ced30aa979df89b26c23afaa31c649df Mon Sep 17 00:00:00 2001 From: sunguangming Date: Tue, 29 Apr 2025 08:01:23 +0000 Subject: [PATCH] * [misc] for sonar. --- module/action/model.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/module/action/model.php b/module/action/model.php index f95ae829ec..70d48302ab 100755 --- a/module/action/model.php +++ b/module/action/model.php @@ -936,7 +936,8 @@ class actionModel extends model if(strlen(trim(($action->comment))) !== 0) { $item->comment = $this->formatActionComment($action->comment); - $item->commentEditable = $commentEditable && $endAction->id == $action->id && $action->actor == $account && common::hasPriv('action', 'editComment') && $action->action == 'commented'; + $currentUserCanEdit = $action->id == $endAction->id && $action->actor == $account && $action->action == 'commented'; + $item->commentEditable = $commentEditable && common::hasPriv('action', 'editComment') && $currentUserCanEdit; } if($action->action === 'assigned' || $action->action === 'toaudit')