Page MenuHomePhabricator

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

Authored by atul on Mar 10 2024, 12:52 PM.
Tags
None
Referenced Files
F3187954: D11286.id38194.diff
Fri, Nov 8, 5:20 PM
F3186070: D11286.id38192.diff
Fri, Nov 8, 2:12 PM
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
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.