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, Sep 10, 5:34 PM
Unknown Object (File)
Tue, Sep 10, 11:17 AM
Unknown Object (File)
Tue, Sep 10, 8:25 AM
Unknown Object (File)
Mon, Sep 9, 8:08 PM
Unknown Object (File)
Mon, Sep 9, 8:08 PM
Unknown Object (File)
Mon, Sep 9, 8:08 PM
Unknown Object (File)
Mon, Sep 9, 8:08 PM
Unknown Object (File)
Mon, Sep 9, 8:08 PM
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
Branch
arcpatch-D12789 (branched from master)
Lint
No Lint Coverage
Unit
No Test Coverage

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.