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, Nov 7, 2:38 AM
Unknown Object (File)
Tue, Oct 15, 8:04 PM
Unknown Object (File)
Tue, Oct 15, 8:04 PM
Unknown Object (File)
Tue, Oct 15, 8:04 PM
Unknown Object (File)
Tue, Oct 15, 8:04 PM
Unknown Object (File)
Tue, Oct 15, 8:04 PM
Unknown Object (File)
Tue, Oct 15, 8:04 PM
Unknown Object (File)
Sep 23 2024, 1:26 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.