Skip to content

Commit 8ebbe1d

Browse files
committed
fix:75166: Copilot with limited access level can retract expenses
1 parent 8cb7f86 commit 8ebbe1d

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
@@ -353,6 +353,11 @@ function useLifecycleActions({reportID, startApprovedAnimation, startAnimation,
353353
icon: expensifyIcons.CircularArrowBackwards,
354354
sentryLabel: CONST.SENTRY_LABEL.MORE_MENU.RETRACT,
355355
onSelected: async () => {
356+
if (isDelegateAccessRestricted) {
357+
showDelegateNoAccessModal();
358+
return;
359+
}
360+
356361
if (isExported) {
357362
const reopenExportedReportWarningText = (
358363
<Text>
@@ -387,6 +392,11 @@ function useLifecycleActions({reportID, startApprovedAnimation, startAnimation,
387392
icon: expensifyIcons.CircularArrowBackwards,
388393
sentryLabel: CONST.SENTRY_LABEL.MORE_MENU.REOPEN,
389394
onSelected: async () => {
395+
if (isDelegateAccessRestricted) {
396+
showDelegateNoAccessModal();
397+
return;
398+
}
399+
390400
if (isExported) {
391401
const reopenExportedReportWarningText = (
392402
<Text>

0 commit comments

Comments
 (0)