-
Notifications
You must be signed in to change notification settings - Fork 53
[BITAU-152] Handle Vault Lock/Unlock with Sync #998
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BITAU-152] Handle Vault Lock/Unlock with Sync #998
Conversation
…to-coredata-store
…ges out of DataStore to prepare for refactor in the brant/create-coredata-store branch
… Keep DataStore generic
…M app CoreData semantics. Refactor conveience methods to new service class
No New Or Fixed Issues Found |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #998 +/- ##
=======================================
Coverage 89.07% 89.07%
=======================================
Files 660 660
Lines 41292 41292
=======================================
+ Hits 36780 36781 +1
+ Misses 4512 4511 -1 ☔ View full report in Codecov by Sentry. |
BitwardenShared/Core/Platform/Services/AuthenticatorSyncService.swift
Outdated
Show resolved
Hide resolved
BitwardenShared/Core/Platform/Services/AuthenticatorSyncService.swift
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good on my side! However I'd wait for @matt-livefront and @KatherineInCode to review as well in case I've missed something.
BitwardenShared/Core/Platform/Services/AuthenticatorSyncService.swift
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
🎟️ Tracking
BITAU-152
📔 Objective
As I mentioned in the previous PR, I needed to add explicit handling of vault lock/unlock status when performing sync. This PR adds subscribers for both the vault status as well as the sync setting. When either is updated (for any account), we examine if that account is ready for sync or not. To be ready for sync, the user must have opted in to sync and they must have an unlocked vault. If either of those are missing, we dismantle any cipher listening and wait for another signal. I've also added a lot of tests to cover all the various scenarios with multiple accounts.
⏰ Reminders before review
🦮 Reviewer guidelines
:+1:
) or similar for great changes:memo:
) or ℹ️ (:information_source:
) for notes or general info:question:
) for questions:thinking:
) or 💭 (:thought_balloon:
) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion:art:
) for suggestions / improvements:x:
) or:warning:
) for more significant problems or concerns needing attention:seedling:
) or ♻️ (:recycle:
) for future improvements or indications of technical debt:pick:
) for minor or nitpick changes