Page MenuHomePhabricator

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

Authored by bartek on Mon, Sep 2, 11:33 PM.
Tags
None
Referenced Files
F2708387: D13224.id43986.diff
Sun, Sep 15, 2:49 PM
F2703876: D13224.id43846.diff
Sun, Sep 15, 2:59 AM
Unknown Object (File)
Sat, Sep 14, 10:58 PM
Unknown Object (File)
Fri, Sep 13, 12:11 PM
Unknown Object (File)
Wed, Sep 11, 8:18 PM
Unknown Object (File)
Tue, Sep 10, 4:09 AM
Unknown Object (File)
Mon, Sep 9, 9:02 AM
Unknown Object (File)
Mon, Sep 9, 12:30 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
Lint Not Applicable
Unit
Tests Not Applicable