HomePhabricator
Diffusion Comm 73d25bc2db2e

[native] Introduce `recursivelyUpdateCurrentMemberPermissions(...)`

Description

[native] Introduce recursivelyUpdateCurrentMemberPermissions(...)

Summary:
We introduce recursivelyUpdateCurrentMemberPermissions(...) which traverses node and all children recursively to update threadInfo.currentUser.permissions.

Very similar to D7602 but handles currentUser.permissions isntead of member.permissions


Depends on D7602

Test Plan:
Ran with correct threadStore and ensured that it remained the same.

Added a unit test to ensure that currentUser.permissions could be "constructed from scratch" (without depending on any existing currentUser.permissions

Similar to D7602 ran into some issues with my prod thread store. Specifically threadID: 892819 and roleID: 89280, hoping I can sync w/ @ashoat in the office tomorrow to troubleshoot since I don't have access to prod DB.

Reviewers: ashoat, ginsu

Reviewed By: ashoat

Subscribers: tomek, ashoat

Differential Revision: https://phab.comm.dev/D7603

Details

Provenance
atulAuthored on Apr 25 2023, 12:55 PM
Reviewer
ashoat
Differential Revision
D7603: [native] Introduce `recursivelyUpdateCurrentMemberPermissions(...)`
Parents
rCOMMd8ea1cf4efa9: [native] Introduce `recursivelyUpdatePermissions(ThreadTraversalNode)`
Branches
Unknown
Tags
Unknown