Skip to content

Commit d6a8779

Browse files
authored
Merge pull request #90076 from Eskalifer1/fix/75166
fix: Copilot with limited access level can retract expenses
2 parents 0f45930 + 78600d2 commit d6a8779

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

src/hooks/useLifecycleActions.tsx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -313,6 +313,11 @@ function useLifecycleActions({reportID, startApprovedAnimation, startSubmittingA
313313
icon: expensifyIcons.CircularArrowBackwards,
314314
sentryLabel: CONST.SENTRY_LABEL.MORE_MENU.RETRACT,
315315
onSelected: async () => {
316+
if (isDelegateAccessRestricted) {
317+
showDelegateNoAccessModal();
318+
return;
319+
}
320+
316321
if (isExported) {
317322
const reopenExportedReportWarningText = (
318323
<Text>
@@ -347,6 +352,11 @@ function useLifecycleActions({reportID, startApprovedAnimation, startSubmittingA
347352
icon: expensifyIcons.CircularArrowBackwards,
348353
sentryLabel: CONST.SENTRY_LABEL.MORE_MENU.REOPEN,
349354
onSelected: async () => {
355+
if (isDelegateAccessRestricted) {
356+
showDelegateNoAccessModal();
357+
return;
358+
}
359+
350360
if (isExported) {
351361
const reopenExportedReportWarningText = (
352362
<Text>

0 commit comments

Comments
 (0)