Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content

feat: preserve sync settings on SSO migration

Description

When migrating a non-SSO Murena account to use SSO, the sync settings for eDrive, Mail, Notes, Contacts, Calendar, and Tasks were not preserved. The sync intervals for Contacts, Calendar, and Tasks were also being reset.

This MR resolves the issue so that the settings and the intervals are preserved.

Screenshots

header header header
Screenshot_20250806_150820 Screenshot_20250806_151840 Screenshot_20250806_152238.png

Technical details

When an account is migrated to SSO, the following settings are now carried over from the old account to the new one:

  • Sync enabled/disabled status for eDrive, Mail, Notes, Contacts, Calendar, and Tasks.
  • Sync interval for Contacts, Calendar, and Tasks.
  • Group method for Contacts.

If it's a new account setup, default sync settings will be applied.

Additionally, the logic for handling CardDAV and CalDAV services during account setup has been updated to:

  • For existing accounts being migrated: Update the existing service record in the database with the new authentication state and principal.
  • For new accounts: Create a new service record.

This commit also addressed the issue where the sync settings for Contacts, Calendar, and Tasks were reset after a device reboot.

Tests

  1. Log in to non-SSO Murena account in Account Manager.
  2. Disable one or more sync settings in Account sync.
  3. Change one or more intervals value and contact group method in Account sync settings.
  4. Migrate to SSO.
  5. Observe that sync settings are preserved.
  6. Observe that sync interval and contact group methods are preserved.
  7. Observe that after a reboot, the sync settings are preserved.

Issues

https://gitlab.e.foundation/e/os/backlog/-/issues/3531

10 commandments of code review

👪 ❤️ https://gitlab.e.foundation/groups/e/-/wikis/contribute/development-processes/code-review-guidelines

Edited by Fahim M. Choudhury

Merge request reports

Loading