HomePhabricator
Diffusion Comm bf5dc4e88c70

[server] Change sidebar permission checks in updateThread

Description

[server] Change sidebar permission checks in updateThread

Summary: Avoids having to call fetchThreadInfos(viewer, parentThreadID), which relies on the viewer having KNOW_OF permissions for the parent. We could hack this to work differently for script viewers, but I actually think it makes more sense to check if the new member already has KNOW_OF for the sidebar, since it should the same thing as checking if they are a member of the parent. In general it's best to avoid custom parent-fetching logic when we can rely on the thread we actually care about.

Test Plan: Tested in concert with following diff (script was erroring without this)

Reviewers: KatPo, subnub, palys-swm

Reviewed By: KatPo, palys-swm

Subscribers: zrebcu411, Adrian, atul, karol-bisztyga

Differential Revision: https://phabricator.ashoat.com/D789

Details

Provenance
ashoatAuthored on Feb 23 2021, 9:24 PM
Reviewer
KatPo
Differential Revision
Restricted Differential Revision
Parents
rCOMM90372ac708c2: [server] Have script viewers automatically pass checkThreads
Branches
Unknown
Tags
Unknown