Page MenuHomePhabricator

[lib] Introduce `persistedRoleInfoValidator` and use in `convertClientDBThreadInfoToRawThreadInfo`
ClosedPublic

Authored by atul on Mar 10 2024, 12:52 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Apr 11, 4:59 PM
Unknown Object (File)
Thu, Apr 11, 4:59 PM
Unknown Object (File)
Thu, Apr 11, 4:59 PM
Unknown Object (File)
Thu, Apr 11, 4:59 PM
Unknown Object (File)
Thu, Apr 11, 4:59 PM
Unknown Object (File)
Thu, Apr 11, 4:58 PM
Unknown Object (File)
Apr 7 2024, 11:27 AM
Unknown Object (File)
Apr 2 2024, 2:27 AM
Subscribers

Details

Summary

In convertClientDBThreadInfoToRawThreadInfo we validate contents of persisted RoleInfos before any migrations are run. After removing isDefault from RoleInfo and roleInfoValidator, we need to handle case where user has persisted RoleInfos WITH the isDefault field included. Otherwise we'll get an error something like this:


Depends on D11276

Test Plan
  • Unit test
  • Installed and logged into old version of native
  • Updated to master, observed that I didn't see the message above:

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

atul requested review of this revision.Mar 10 2024, 1:08 PM
lib/permissions/minimally-encoded-raw-thread-info-validators.js
39–42 ↗(On Diff #37957)

Read-only?

This revision is now accepted and ready to land.Mar 19 2024, 5:01 AM

rebase around everything and land

This revision was landed with ongoing or failed builds.Mar 19 2024, 10:22 AM
This revision was automatically updated to reflect the committed changes.