diff --git a/src/libs/ReportUtils.ts b/src/libs/ReportUtils.ts index f31b4a780c5a..b3d2865a442b 100644 --- a/src/libs/ReportUtils.ts +++ b/src/libs/ReportUtils.ts @@ -1172,6 +1172,15 @@ function isJoinRequestInAdminRoom(report: OnyxEntry): boolean { if (!report) { return false; } + // If this policy isn't owned by Expensify, + // Account manager/guide should not have the workspace join request pinned to their LHN, + // since they are not a part of the company, and should not action it on their behalf. + if (report.policyID) { + const policy = getPolicy(report.policyID); + if (!PolicyUtils.isExpensifyTeam(policy.owner) && PolicyUtils.isExpensifyTeam(currentUserPersonalDetails?.login)) { + return false; + } + } return ReportActionsUtils.isActionableJoinRequestPending(report.reportID); } diff --git a/src/libs/SidebarUtils.ts b/src/libs/SidebarUtils.ts index 3f1b354d70fc..1305ee0da581 100644 --- a/src/libs/SidebarUtils.ts +++ b/src/libs/SidebarUtils.ts @@ -398,7 +398,7 @@ function getOptionData({ result.isIOUReportOwner = ReportUtils.isIOUOwnedByCurrentUser(result as Report); - if (ReportActionsUtils.isActionableJoinRequestPending(report.reportID)) { + if (ReportUtils.isJoinRequestInAdminRoom(report)) { result.isPinned = true; result.isUnread = true; result.brickRoadIndicator = CONST.BRICK_ROAD_INDICATOR_STATUS.INFO;