Page MenuHomePhabricator

[lib] Update `hasPermission` to check `KNOW_OF`
ClosedPublic

Authored by atul on Nov 13 2023, 12:44 PM.
Tags
None
Referenced Files
F3245879: D9844.diff
Thu, Nov 14, 8:32 PM
Unknown Object (File)
Sun, Oct 20, 9:04 AM
Unknown Object (File)
Oct 15 2024, 1:19 AM
Unknown Object (File)
Oct 15 2024, 1:19 AM
Unknown Object (File)
Oct 15 2024, 1:19 AM
Unknown Object (File)
Oct 15 2024, 1:14 AM
Unknown Object (File)
Sep 19 2024, 7:07 PM
Unknown Object (File)
Sep 14 2024, 5:09 PM
Subscribers
None

Details

Summary

Context in this diff: https://phab.comm.dev/D9841


Depends on D9843

Test Plan

Introduced test case where hasPermission should've failed, and now does fail.

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

lib/permissions/minimally-encoded-thread-permissions.js
124–126 ↗(On Diff #33145)

Could alternatively AND the permissionBitmask and knowOfBitmask together before the check, but I think having two separate "JS conditions" would make things easier to debug

Open to going with that approach if preferred

atul published this revision for review.Nov 13 2023, 12:48 PM
This revision is now accepted and ready to land.Nov 13 2023, 12:49 PM