Skip to content

Commit

Permalink
Merge pull request #33564 from dukenv0307/fix/33296
Browse files Browse the repository at this point in the history
Task assignee list opens with deep link when user has no access to edit task
  • Loading branch information
robertjchen authored Dec 29, 2023
2 parents 833d3c0 + 871fa8f commit 8c9a30d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/pages/tasks/TaskAssigneeSelectorModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -263,8 +263,11 @@ export default compose(
session: {
key: ONYXKEYS.SESSION,
},
}),
withOnyx({
rootParentReportPolicy: {
key: ({report}) => {
key: ({reports, route}) => {
const report = reports[`${ONYXKEYS.COLLECTION.REPORT}${route.params?.reportID || '0'}`];
const rootParentReport = ReportUtils.getRootParentReport(report);
return `${ONYXKEYS.COLLECTION.POLICY}${rootParentReport ? rootParentReport.policyID : '0'}`;
},
Expand Down

0 comments on commit 8c9a30d

Please sign in to comment.