@@ -191,13 +191,15 @@ function ReportDetailsPage({policies, report, route}: ReportDetailsPageProps) {
191
191
const moneyRequestAction = transactionThreadReportID ? requestParentReportAction : parentReportAction ;
192
192
193
193
const canModifyTask = Task . canModifyTask ( report , session ?. accountID ?? - 1 ) ;
194
+ const canActionTask = Task . canActionTask ( report , session ?. accountID ?? - 1 ) ;
194
195
const shouldShowTaskDeleteButton =
195
196
isTaskReport &&
196
197
! isCanceledTaskReport &&
197
198
ReportUtils . canWriteInReport ( report ) &&
198
199
report . stateNum !== CONST . REPORT . STATE_NUM . APPROVED &&
199
200
! ReportUtils . isClosedReport ( report ) &&
200
- canModifyTask ;
201
+ canModifyTask &&
202
+ canActionTask ;
201
203
const canDeleteRequest = isActionOwner && ( ReportUtils . canDeleteTransaction ( moneyRequestReport ) || isSelfDMTrackExpenseReport ) && ! isDeletedParentAction ;
202
204
const shouldShowDeleteButton = shouldShowTaskDeleteButton || canDeleteRequest ;
203
205
@@ -365,7 +367,7 @@ function ReportDetailsPage({policies, report, route}: ReportDetailsPageProps) {
365
367
366
368
// Show actions related to Task Reports
367
369
if ( isTaskReport && ! isCanceledTaskReport ) {
368
- if ( ReportUtils . isCompletedTaskReport ( report ) && canModifyTask ) {
370
+ if ( ReportUtils . isCompletedTaskReport ( report ) && canModifyTask && canActionTask ) {
369
371
items . push ( {
370
372
key : CONST . REPORT_DETAILS_MENU_ITEM . MARK_AS_INCOMPLETE ,
371
373
icon : Expensicons . Checkmark ,
@@ -474,6 +476,7 @@ function ReportDetailsPage({policies, report, route}: ReportDetailsPageProps) {
474
476
unapproveExpenseReportOrShowModal ,
475
477
isExpenseReport ,
476
478
backTo ,
479
+ canActionTask ,
477
480
] ) ;
478
481
479
482
const displayNamesWithTooltips = useMemo ( ( ) => {
0 commit comments