HomePhabricator
Diffusion Comm 561705347d2c

[lib] Update `threadHasPermission` to "go through" `permissionLookup`

Description

[lib] Update threadHasPermission to "go through" permissionLookup

Summary:
Update threadHasPermission to "go through" permissionLookup for checking permissions rather than indexing into threadInfo.currentUser.permission directly.
This ensures that behavior of threadHasPermission matches permissionLookup. Specifically, to ensure that the KNOW_OF permission is also true in addition to whatever permission is being checked. This will also ensure that in the future we only need to add conditions in "one place."


Depends on D9844

Test Plan: Close reading/flow, don't think we need a unit test for this...

Reviewers: ashoat, ginsu, rohan, tomek

Reviewed By: ashoat

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

Details

Provenance
atulAuthored on Nov 13 2023, 12:56 PM
Reviewer
ashoat
Differential Revision
D9845: [lib] Update `threadHasPermission` to "go through" `permissionLookup`
Parents
rCOMM153470bd0b5e: [lib] Update `hasPermission` to check `KNOW_OF`
Branches
Unknown
Tags
Unknown