Page MenuHomePhabricator

[keyserver] Update `fetchRoles(threadID: string)` to fetch special_role
ClosedPublic

Authored by atul on Nov 30 2023, 1:04 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Nov 8, 8:52 PM
Unknown Object (File)
Fri, Oct 25, 6:01 PM
Unknown Object (File)
Oct 4 2024, 1:12 AM
Unknown Object (File)
Oct 4 2024, 1:12 AM
Unknown Object (File)
Oct 4 2024, 1:12 AM
Unknown Object (File)
Oct 4 2024, 1:12 AM
Unknown Object (File)
Oct 4 2024, 1:12 AM
Unknown Object (File)
Sep 20 2024, 12:38 PM
Subscribers

Details

Summary

We want to update code that fetches from threads or roles to appropriately also fetch roles.special_role so we can include it in the return object. For now, I will leave in the r.special_role = ${specialRoles.DEFAULT_ROLE} AS is_default since I'm intermediately leaving in the isDefault property in RoleInfo. Towards the end of the stack, I will remove this check alongside the property as mentioned in the Linear task.

This diff handles role-fetchers.js

Part of ENG-5993


Depends on D10969

Test Plan

Ran the query before and after to confirm the results are identical, except with the new special_role field

Diff Detail

Repository
rCOMM Comm
Branch
master
Lint
No Lint Coverage
Unit
No Test Coverage

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:54 AM
atul edited reviewers, added: rohan; removed: atul.
atul retitled this revision from [keyserver] Update role-fetchers to fetch special_role to [keyserver] Update `fetchRoles(threadID: string)` to fetch special_role.Feb 6 2024, 11:19 AM

Updated return type of fetchRoles(...) to Promise<ServerLegacyRoleInfo[]>.

fetchRoles(...) is only consumed by updateRoles(...) which disregards special_role field so there was no additional refactoring needed.

This diff should be fine to land as-is since it's effectively a noop.

atul requested review of this revision.Feb 6 2024, 11:54 AM
atul edited the summary of this revision. (Show Details)
This revision is now accepted and ready to land.Feb 7 2024, 12:21 PM