HomePhabricator
Diffusion Comm 9034ce7f2ecb

[keyserver/lib] Add keyserver support for creating roles

Description

[keyserver/lib] Add keyserver support for creating roles

Summary:
This diff adds the keyserver support for creating new roles with a set of permissions. configurableCommunityPermissions was introduced in the previous diff, and those are the user-selectable permissions that are provided here, and we introduce guaranteedCommunityPermissions here and merge the two arrays to derive a set of permissions for the new role. Generating thread updates will happen in a later diff

The reason I named things modifyRoles / RoleModification, as opposed to createRole / RoleCreation is because I plan to re-use this code as much as possible for the edit_roles flow. Because of this, I intended to name these functions / types as something that could be used both across creating roles and editing roles.

Only adding @ashoat as a reviewer here since it 1) directly addresses his feedback about introducing the guaranteedCommunityPermissions alongside its callsite, and 2) it involves community permissions and I'm not sure who has the most context on them.

Depends on D8391

ENG-4173

Test Plan:
Between this diff and the last diff, I added a rough call to create a custom role when the client-side 'Create role' button is clicked, and confirmed that it saved in the DB. The next diff will add the logic to actually save a new role from the client.

Screenshot 2023-07-03 at 10.59.37 AM.png (52×1 px, 59 KB)

Reviewers: atul, ginsu, ashoat

Reviewed By: ashoat

Subscribers: tomek, ashoat

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

Details

Provenance
rohanAuthored on Jul 17 2023, 9:42 AM
Reviewer
ashoat
Differential Revision
D8420: [keyserver/lib] Add keyserver support for creating roles
Parents
rCOMM0d5c2d49e7fc: [native] Populate the create role screen
Branches
Unknown
Tags
Unknown