HomePhabricator
Diffusion Comm b9cada1ad34e

[keyserver] Prevent updateRoles from resetting user-surfaced permissions

Description

[keyserver] Prevent updateRoles from resetting user-surfaced permissions

Summary:
This resolves ENG-9031.

updateRoles currently resets user-surfaced permissions to the default. This diff instead attempts to reconstruct the set of user-surfaced permissions based on the current role permissions, and then reapply then when generating the updated permissions.

Depends on D13074

Test Plan:
I tested this in combination with the next diff, where we add a updateRolesAndPermissionsForAllThreads migration:

  • Create a community
  • Update Members permission to include managing tags
  • Run the migration
  • Confirm that the managing tags permissions is still present

Reviewers: tomek, inka

Reviewed By: tomek

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

Details

Provenance
ashoatAuthored on Aug 13 2024, 12:46 PM
Reviewer
tomek
Differential Revision
D13075: [keyserver] Prevent updateRoles from resetting user-surfaced permissions
Parents
rCOMM9499881e4603: [keyserver][lib] Restrict updateRoles endpoint to ThinThreadType
Branches
Unknown
Tags
Unknown