Page MenuHomePhabricator

[keyserver] Update role-creator to include specialRole field
ClosedPublic

Authored by atul on Nov 30 2023, 1:11 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Nov 14, 10:58 PM
Unknown Object (File)
Thu, Nov 14, 2:01 AM
Unknown Object (File)
Nov 1 2024, 11:42 AM
Unknown Object (File)
Oct 25 2024, 6:06 PM
Unknown Object (File)
Oct 25 2024, 6:06 PM
Unknown Object (File)
Oct 25 2024, 6:06 PM
Unknown Object (File)
Oct 25 2024, 6:06 PM
Unknown Object (File)
Oct 25 2024, 6:06 PM
Subscribers

Details

Summary

There are some places in the codebase that we hardcode isDefault. Here, we'll want to introduce the specialRole field alongside, so when we deprecate isDefault, no additional changes will be needed. Some are important (like one instance in thread-utils.js and the instance in role-creator.js where we set up initial roles for threads), and others are just test data. Nonetheless, I thought I may as well update all of them for consistency.

Part of ENG-5993

This diff handles role-creator.js

Depends on D10107

Test Plan

Right now, just flow to make sure we didn't violate the type. Further testing can be done once isDefault is removed

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

rohan held this revision as a draft.
rohan published this revision for review.Nov 30 2023, 1:33 PM
This revision is now accepted and ready to land.Dec 1 2023, 7:55 AM
atul edited reviewers, added: rohan; removed: atul.

update

lib/shared/thread-utils.js
767 ↗(On Diff #36886)

This should not have been staged, this was from testing another diff. Will update

This should be safe to land on its own:

  1. createInitialRolesForNewThread() is only called by createThread() in thread-creator
  2. The only fields accessed are newRoles.default.id and newRoles.creator.id, so nothing changes here
This revision was landed with ongoing or failed builds.Feb 8 2024, 1:37 PM
This revision was automatically updated to reflect the committed changes.