HomePhabricator
Diffusion Comm 9f3bac32a703

[server] Make sure we update parentThreadID in updateRole before updating…

Description

[server] Make sure we update parentThreadID in updateRole before updating permissions

Summary:
Permissions depend on the parentThreadID, and the SQL queries in thread-permission-updaters.js depend on the parent_thread column. Consequently, we should make sure we update this column before calculating a MembershipChangeset.

It's not currently possible in the UI to change a thread's parent thread, but I figured I would make this change for correctness's sake.

Test Plan: This only matters if updateThread changes the thread's parent thread, which isn't currently possible in the UI, so this one is hard to test. I'm content that the extensive testing I did for the other diffs in this series would've caught any serious issues

Reviewers: palys-swm

Reviewed By: palys-swm

Subscribers: KatPo, Adrian, atul

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

Details

Provenance
ashoatAuthored on Apr 14 2021, 9:18 PM
Reviewer
tomek
Differential Revision
Restricted Differential Revision
Parents
rCOMMc59a71ec16b5: [server] Take parent thread permissions into account in changeRole
Branches
Unknown
Tags
Unknown