Page MenuHomePhabricator

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

Authored by atul on Mar 10 2024, 12:52 PM.
Tags
None
Referenced Files
F3379667: D11286.id38197.diff
Wed, Nov 27, 6:01 PM
Unknown Object (File)
Wed, Nov 27, 6:21 AM
Unknown Object (File)
Tue, Nov 26, 1:32 AM
Unknown Object (File)
Mon, Nov 25, 6:46 PM
Unknown Object (File)
Mon, Nov 25, 1:34 PM
Unknown Object (File)
Mon, Nov 25, 9:20 AM
Unknown Object (File)
Mon, Nov 25, 12:05 AM
Unknown Object (File)
Sun, Nov 24, 11:34 PM
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
Branch
arcpatch-D11286 (branched from master)
Lint
No Lint Coverage
Unit
No Test Coverage

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.