Skip to content

Feature/organizer comment notification toggle#68

Open
zhouyijun111 wants to merge 3 commits intomainfrom
feature/organizer-comment-notification-toggle
Open

Feature/organizer comment notification toggle#68
zhouyijun111 wants to merge 3 commits intomainfrom
feature/organizer-comment-notification-toggle

Conversation

@zhouyijun111
Copy link
Copy Markdown

What this PR does

This PR adds an organizer-level toggle to control whether “proposal comment” notification emails are sent to organizers.

Changes

  • Database: Added users_roles.email_notifications (default: enabled).
  • Admin UI: Added an “Email notifications” switch on the conference organizer users list (AJAX-backed).
  • Backend: Implemented Admin::RolesController#toggle_comment_notifications to persist the preference.
  • Authorization: Updated AdminAbility to allow the toggle action.
  • Email delivery: Updated the comment-notification recipient scope so organizer users only receive emails when email_notifications = true.
  • Frontend: Improved osem-switch.js handling to prevent incorrect auto-triggering during initialization/cache restore.

Test plan

  1. Go to the admin page for a conference and open the organizer user list.
  2. Toggle “Email notifications” to No.
  3. Create a new proposal comment.
  4. Verify in letter_opener that no email is sent to that organizer.
  5. Toggle “Email notifications” back to Yes.
  6. Create another proposal comment.
  7. Verify in letter_opener that an email is sent.

Screenshot

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant