@@ -42,7 +42,7 @@ import interceptAnonymousUser from '@libs/interceptAnonymousUser';
4242import Navigation from '@libs/Navigation/Navigation' ;
4343import type { PlatformStackRouteProp } from '@libs/Navigation/PlatformStackNavigation/types' ;
4444import type { AuthScreensParamList } from '@libs/Navigation/types' ;
45- import { getPolicy , getPolicyBrickRoadIndicatorStatus , isPolicyAdmin , shouldShowPolicy } from '@libs/PolicyUtils' ;
45+ import { getDefaultApprover , getPolicy , getPolicyBrickRoadIndicatorStatus , isPolicyAdmin , shouldShowPolicy } from '@libs/PolicyUtils' ;
4646import { getDefaultWorkspaceAvatar } from '@libs/ReportUtils' ;
4747import { shouldCalculateBillNewDot as shouldCalculateBillNewDotFn } from '@libs/SubscriptionUtils' ;
4848import type { AvatarSource } from '@libs/UserUtils' ;
@@ -217,8 +217,8 @@ function WorkspacesListPage() {
217217 shouldCallAfterModalHide : ! shouldCalculateBillNewDot ,
218218 } ) ;
219219 }
220-
221- if ( ! ( isAdmin || isOwner ) ) {
220+ const defaultApprover = getDefaultApprover ( policies ?. [ ` ${ ONYXKEYS . COLLECTION . POLICY } ${ item . policyID } ` ] ) ;
221+ if ( ! ( isAdmin || isOwner ) && defaultApprover !== session ?. email ) {
222222 threeDotsMenuItems . push ( {
223223 icon : Expensicons . Exit ,
224224 text : translate ( 'common.leave' ) ,
@@ -290,6 +290,7 @@ function WorkspacesListPage() {
290290 shouldCalculateBillNewDot ,
291291 loadingSpinnerIconIndex ,
292292 resetLoadingSpinnerIconIndex ,
293+ policies ,
293294 ] ,
294295 ) ;
295296
0 commit comments