Page MenuHomePhabricator

[identity] Allow register_primary_device() to overwrite device list
ClosedPublic

Authored by bartek on Sep 2 2024, 11:33 PM.
Tags
None
Referenced Files
F3346760: D13224.diff
Fri, Nov 22, 9:46 AM
Unknown Object (File)
Sat, Nov 9, 8:36 PM
Unknown Object (File)
Sat, Nov 9, 2:38 PM
Unknown Object (File)
Sat, Nov 9, 7:25 AM
Unknown Object (File)
Oct 22 2024, 6:30 PM
Unknown Object (File)
Oct 22 2024, 6:30 PM
Unknown Object (File)
Oct 22 2024, 6:29 PM
Unknown Object (File)
Oct 10 2024, 1:10 PM
Subscribers

Details

Summary

The register_primary_device() is used during primary device registration. It makes sure previous device list doesn't exist (user is new).
It can be easily reused for backup restore protocol (we also register new primary device here), but this function must accept previous device lists
as long as lastPrimarySignature is provided (always true in case of backup restore protocol).

Depends on D13223

Test Plan

Similiar to the test plan from D13222. Tried registering primary device (calling this func manually):

  • Passed for the first time (no previous device list)
  • Failed for the second time (still singleton list, but with different primary device ID)
  • Second case passed when provided lastPrimarySignature

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable