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
F3197133: D13224.id43846.diff
Sat, Nov 9, 7:25 AM
Unknown Object (File)
Tue, Oct 22, 6:30 PM
Unknown Object (File)
Tue, Oct 22, 6:30 PM
Unknown Object (File)
Tue, Oct 22, 6:29 PM
Unknown Object (File)
Thu, Oct 10, 1:10 PM
Unknown Object (File)
Oct 1 2024, 10:25 PM
Unknown Object (File)
Oct 1 2024, 1:05 AM
Unknown Object (File)
Sep 27 2024, 6:59 AM
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
No Lint Coverage
Unit
No Test Coverage