Lock private profile sync state

This commit is contained in:
2026-05-08 20:19:09 -04:00
parent a299815e51
commit 8e450496e0
5 changed files with 58 additions and 4 deletions
@@ -100,6 +100,9 @@ impl BrowserCore {
.iter_mut()
.find(|profile| profile.id() == profile_id)
.ok_or_else(|| CoreError::ProfileNotFound { id: profile_id.clone() })?;
if sync_policy == ProfileSyncPolicy::Enabled && !profile.allows_sync() {
return Err(CoreError::PrivateProfileSyncLocked { id: profile_id.clone() });
}
profile.set_sync_policy(sync_policy);
Ok(())