Page MenuHomePhabricator

[native] Introduce `native` migration to strip member permissions
ClosedPublic

Authored by atul on Jul 17 2024, 4:02 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Aug 27, 8:26 PM
Unknown Object (File)
Tue, Aug 27, 4:56 PM
Unknown Object (File)
Tue, Aug 27, 9:21 AM
Unknown Object (File)
Tue, Aug 27, 3:00 AM
Unknown Object (File)
Mon, Aug 26, 9:10 PM
Unknown Object (File)
Sun, Aug 25, 6:41 PM
Unknown Object (File)
Mon, Aug 19, 10:31 PM
Unknown Object (File)
Fri, Aug 9, 3:09 AM
Subscribers
None

Details

Summary

Client side change to strip member permissions from persisted thread infos.


Depends on D12788

Test Plan

Ran migration on native client successfully:

60cee7.png (638×2 px, 249 KB)

Redux DevTools before:

3dfb76.png (1×1 px, 310 KB)

Redux DevTools after:

image.png (500×1 px, 72 KB)

Will do a couple more run-throughs on native to make sure everything is good.

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

atul requested review of this revision.Jul 17 2024, 4:19 PM
ashoat added inline comments.
native/redux/persist.js
1423–1426 ↗(On Diff #42428)

Can we do something more explicit here?

// This isn't actually accurate, but we force this cast here because the
// types for createUpdateDBOpsForThreadStoreThreadInfos assume they're
// converting from a client DB that contains RawThreadInfos. In fact, at
// this point the client DB contains ThinRawThreadInfoWithPermissions.
const stripMemberPermissions: RawThreadInfos => RawThreadInfos =
  (stripMemberPermissionsFromRawThreadInfos: any);
This revision is now accepted and ready to land.Jul 18 2024, 12:12 PM

address feedback (any-cast stripMemberPermissionsFromRawThreadInfos instead of $FlowIgnore)

This revision was landed with ongoing or failed builds.Jul 19 2024, 5:07 PM
This revision was automatically updated to reflect the committed changes.