HomePhabricator
Diffusion Comm 102a7d037cf1

[keyserver/lib] Enable the option to delete custom roles

Description

[keyserver/lib] Enable the option to delete custom roles

Summary:
This diff handles the flow for deleting custom roles. There are two cases to consider here when a role is deleted: (1) if there are no members assigned to the role, just delete it. (2) If there are members assigned to the role, then we need to display in the Alert message that they will be assigned to the default role (I did not hardcode the role name 'Members' since we're allowing it to be renamed, so instead I pull the default role name from the threadInfo).

A lot of the code in this diff is the scaffolding for the deletion API, so I decided that covering it all in one diff would be more logical and easier to review.

ENG-4389

Depends on D8564

Test Plan:
Confirmed that role deletion works successfully for both cases (1) and (2).

Reviewers: atul, ginsu, ashoat

Reviewed By: ginsu, ashoat

Subscribers: ashoat, tomek

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

Details

Provenance
rohanAuthored on Jul 21 2023, 7:57 AM
Reviewer
ginsu
Differential Revision
D8574: [keyserver/lib] Enable the option to delete custom roles
Parents
rCOMM5bf8ab7922de: [native] Support the edit_role action on the keyserver
Branches
Unknown
Tags
Unknown