Page MenuHomePhabricator

Fix several issues with email-related global preferences
ClosedPublic

Authored by epriestley on Jun 14 2016, 7:18 PM.
Tags
None
Referenced Files
F14356532: D16118.id38781.diff
Thu, Dec 19, 9:38 PM
Unknown Object (File)
Tue, Dec 17, 7:51 AM
Unknown Object (File)
Thu, Dec 12, 12:44 PM
Unknown Object (File)
Mon, Dec 9, 1:39 PM
Unknown Object (File)
Sat, Nov 30, 4:37 PM
Unknown Object (File)
Wed, Nov 27, 2:24 AM
Unknown Object (File)
Tue, Nov 26, 6:06 PM
Unknown Object (File)
Tue, Nov 26, 2:46 PM
Subscribers
None

Details

Summary

Ref T11098. Mixture of issues here:

  • Similar problem to D16112, where users with no settings at all could fail to fall back to the global defaults.
    • I made UserPreferencesQuery responsible for building defaults instead to simplify this, since we have 4 or 5 callsites which need to do it and they aren't easily reducible.
  • Handle cases where metamta.one-mail-per-recipient is off (and thus users can not have any custom settings) more explicitly.
  • When metamta.one-mail-per-recipient is off, remove the "Email Format" panel for users only -- administrators can still access it in global preferences.
Test Plan
  • Deleted a user's preferences, changed globals, purged cache, made sure defaults reflected global defaults.
  • Changed global mail tags, sent mail to the user, verified it was dropped in accordinace with global settings.
  • Changed user's settings to get the mail instead, verified mail was sent.
  • Toggled user's Re / Vary settings, verified mail subject lines reflected user settings.
  • Disabled metamta.one-mail-per-recipient, verified user "Email Format" panel vanished.
  • Edited "Email Format" in single-mail-mode in global prefs as an administrator.
  • Sent more mail, verified mail respected new global settings.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

epriestley retitled this revision from to Fix several issues with email-related global preferences.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: chad.
chad edited edge metadata.
This revision is now accepted and ready to land.Jun 14 2016, 7:34 PM
This revision was automatically updated to reflect the committed changes.