-
Notifications
You must be signed in to change notification settings - Fork 444
Auto dispatch emails #4167
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
Draft
LukasMalyszko
wants to merge
230
commits into
master
Choose a base branch
from
auto-dispatch
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Auto dispatch emails #4167
Changes from 212 commits
Commits
Show all changes
230 commits
Select commit
Hold shift + click to select a range
393c392
Add notify emails functionality to Push model and forms
LukasMalyszko 6adc148
Refactor error messages in MultipleEmailsValidator for clarity
LukasMalyszko 97e974e
Add SMTP configuration check and conditionally render notify emails f…
LukasMalyszko db67ff6
Refactor email parsing and validation for notify emails functionality
LukasMalyszko a6c003f
Add throttling setting for push creation requests
LukasMalyszko 5cdfa6e
Enhance push creation and notification email handling
LukasMalyszko aeec33c
Add tests to enforce immutability of notify_emails_to fields on update
LukasMalyszko f35a328
Refactor email error handling and update PushCreatedMailer subject line
LukasMalyszko fca92e2
Update subject line in PushCreatedMailer for improved clarity
LukasMalyszko a8cb1e4
Add tests for notify_emails_to validation and email notification content
LukasMalyszko 5869d0c
Enhance test for email subject presence in PushCreatedMailer
LukasMalyszko 7c36c7f
Add time formatting methods and update email notifications
LukasMalyszko 2690ad9
Add tests for notify_emails_to handling and email notification content
LukasMalyszko 407c779
Refactor Rack::Attack throttling for push creation and enhance tests …
LukasMalyszko f5c91e9
Add tests for HTML and text parts of PushCreatedMailer notifications
LukasMalyszko 173bf36
Add tests for HTML structure and link validation in PushCreatedMailer…
LukasMalyszko 399f849
Add test to validate secret link text in PushCreatedMailer notifications
LukasMalyszko 5ef9324
Update parameter documentation for format_minutes_duration method in …
LukasMalyszko 83ee73b
Refactor secret URL generation in ApplicationHelper and update PushCr…
LukasMalyszko e1bb879
Update PushCreatedMailer notifications to handle missing user email a…
LukasMalyszko 0e77f8a
Add inline job execution for email notifications in development envir…
LukasMalyszko 603ac11
Enhance email notification handling and formatting
LukasMalyszko 3e3e7ff
Add audit log creation for email notifications in SendPushCreatedEmai…
LukasMalyszko 09d02ad
Refactor MultipleEmailsValidator for improved email validation
LukasMalyszko d707311
Merge remote-tracking branch 'origin/master' into auto-dispatch
LukasMalyszko 6543105
Merge branch 'master' into auto-dispatch
pglombardo 25107c9
Merge branch 'master' into auto-dispatch
pglombardo f18159b
Add language dropdown for email notifications and update related forms
LukasMalyszko 7f47d87
Update email notification logic to respect login settings
LukasMalyszko 6eb6ce2
Update email notification wording for clarity
LukasMalyszko bf2a54a
Refine email notification message for improved clarity
LukasMalyszko 2a425a0
Enhance SSL handling in email notifications and refine duration forma…
LukasMalyszko 58e3141
Remove pushes per day throttle configuration and related tests
LukasMalyszko e55c7d0
Update email notification logic to use user account email settings
LukasMalyszko 212f97a
Enhance email notification settings and SSL handling
LukasMalyszko be7ff8f
Enhance Rack::Attack configuration for improved throttling
LukasMalyszko 7399282
Merge origin/master into auto-dispatch
LukasMalyszko 2d5095a
Refactor test setup and teardown for email notification settings
LukasMalyszko 5c9380d
Refactor language selection in email notifications
LukasMalyszko 24d2e1b
Implement notify emails field visibility logic and update push expira…
LukasMalyszko 007b0ca
Refactor email notification job and audit log
LukasMalyszko 2639a0b
Implement notify emails feature in Pushes
LukasMalyszko f6c2463
Refactor notify emails field rendering in forms
LukasMalyszko 73b6fac
Add notify_emails_to_locale_ciphertext column to pushes table
LukasMalyszko d87b99e
Refactor PushCreatedMailer and enhance send_creation_emails documenta…
LukasMalyszko 07932dd
Refactor PushesController and email job for improved functionality
LukasMalyszko 587fa42
Update PushesController and views for parameter handling and email fi…
LukasMalyszko 06ad4e6
Enhance accessibility for email language selection in notifications
LukasMalyszko a091abb
Enhance JSON serialization in Push model to exclude sensitive fields
LukasMalyszko 2329383
Update show_notify_emails_field? method to include login setting check
LukasMalyszko e3590b0
Merge remote-tracking branch 'origin/master' into auto-dispatch
LukasMalyszko de46b88
Update application helper to check for disabled logins and adjust tes…
LukasMalyszko 1413ebf
Merge branch 'master' into auto-dispatch
LukasMalyszko 69b34c8
Refactor dropdown item styles in notification email locale view
LukasMalyszko 89d9941
Enhance dropdown styling for notification email locale menu
LukasMalyszko 60119bd
Refactor notification email locale menu styles
LukasMalyszko b06d971
Update dropdown item class for improved text wrapping in notification…
LukasMalyszko 51c937b
Refactor HTTPS link support in application helper
LukasMalyszko 51f2597
Refactor controller registrations in index.js
LukasMalyszko 2f95af5
Remove obsolete test for FORCE_SSL in PushCreatedMailerTest
LukasMalyszko 6eca4aa
Refactor secret URL and notification email locale dropdowns
LukasMalyszko 5ec786e
Update button style in secret URL bar for improved layout and alignment
LukasMalyszko fa269f6
Refactor locale dropdown component for improved readability and maint…
LukasMalyszko 0c0eb0b
Remove unnecessary setup and teardown for Settings in PushNotifyEmail…
LukasMalyszko e58245f
Merge remote-tracking branch 'origin/master' into auto-dispatch
LukasMalyszko 1102cbb
Refactor code for consistency and readability
LukasMalyszko 610e817
Update button style in notify emails locale dropdown for improved layout
LukasMalyszko 9c55cfd
Adjust padding in locale dropdown items for improved layout consistency
LukasMalyszko b1df096
Enhance locale dropdown functionality and styling
LukasMalyszko e36ed96
Refactor notify emails partials to integrate locale dropdown
LukasMalyszko 7067c83
Refactor email delivery logic in SendPushCreatedEmailJob
LukasMalyszko cf701a2
Refactor locale dropdown integration and remove unused controller
LukasMalyszko f298e0c
Fix CSS comment formatting and ensure newline at end of file in custo…
LukasMalyszko 756abf8
Refactor push email notification logic and remove unused concern
LukasMalyszko 1aa621a
Remove commented-out code and improve test clarity in NotifyEmailsFie…
LukasMalyszko 6b2ab9f
Refactor email notification handling in Push model and mailer
LukasMalyszko 0317710
Update email subject assertions in tests for consistency and clarity
LukasMalyszko 4a5b968
copying mailer from PRO
LukasMalyszko b04b4db
Refactor comment in notify_emails_to concern for clarity
LukasMalyszko 4392053
Fix indentation in email subject assertion for clarity in SendPushCre…
LukasMalyszko 386807d
Update test name for clarity in ApplicationHelperTest
LukasMalyszko 781e880
Merge remote-tracking branch 'origin/master' into auto-dispatch
LukasMalyszko 1249431
Fix closing tag for notify emails field in multiple forms
LukasMalyszko f9c0ee4
Add push_locale_dropdown_url helper and update forms to include notif…
LukasMalyszko b460a1d
Refactor forms to improve layout consistency
LukasMalyszko 79efb56
Update version of a migration file
ozovalihasan 69541a1
Add a view for the `notify_email_to_locale` attribute of pushes
ozovalihasan 7894451
Merge remote-tracking branch 'origin/master' into auto-dispatch
ozovalihasan 750a525
Update validations for `notify_emails_to` attribute of pushes
ozovalihasan cf813d5
Update tests of SendPushCreatedEmailJob
ozovalihasan c1c9e43
Remove an unnecessary test of SendPushCreatedEmailJob
ozovalihasan 8e26760
Revert unnecessary changes
ozovalihasan 3ffbdc2
Remove unnecessary log used to debug
ozovalihasan 7c9f17d
Update a few small points
ozovalihasan 331e371
Fix a module name
ozovalihasan 2c4464d
Update push to require owner if notify_emails_to or notify_emails_to_…
ozovalihasan 3e58510
Remove an unnecessary method from Pwpush::NotifyEmailsTo
ozovalihasan 172c675
Update conditions used to show `notify_emails_to` fields
ozovalihasan 76ebff4
Update tests of MultipleEmailsValidator
ozovalihasan 3ec3dea
Remove tests for a view
ozovalihasan bc08be5
Fix tests related to auto-dispatch
ozovalihasan e53f6c1
Merge remote-tracking branch 'origin/master' into auto-dispatch
ozovalihasan f9490ff
Update description of some tests
ozovalihasan f8815c4
Merge remote-tracking branch 'origin/master' into auto-dispatch
ozovalihasan 3ee69e5
Update tests of pushes related to `notify_emails_to` attribute
ozovalihasan dd682da
Remove unnecessary lines of a test
ozovalihasan 60643ad
Add a system test for auto-dispatch feature
ozovalihasan 06178d9
Refactor tests related to `notify_emails_to`
ozovalihasan 9df7cd5
Merge remote-tracking branch 'origin/master' into auto-dispatch
ozovalihasan 527ba42
Refactor params of PushesController
ozovalihasan e22d75e
Add notify_emails_to_recipients for pushes
ozovalihasan 2aca8a3
Add ShareByEmail model
ozovalihasan 81a7d90
Update Pushes controller to render preview for failed shares
ozovalihasan be68594
Add encryption for columns of ShareByEmail
ozovalihasan 18e612f
Update tests of PushCreatedMailer
ozovalihasan 9e403aa
Add tests for share_by_email model
ozovalihasan 890422f
Update an integration test of the share by email feature
ozovalihasan 9013d91
Add a preview for PushCreatedMailer
ozovalihasan 3513d76
Update all names related notify by email feature
ozovalihasan d371eb2
Fix unselected option issue of notify_by_email locale
ozovalihasan 2a675ca
Add an endpoint for notify_by_email feature
ozovalihasan de6fab9
Add system tests for the notify by email feature
ozovalihasan 182d4f7
Add tests for APIv2 PushesController
ozovalihasan 29c57da
Fix indentation issue on the preview view
ozovalihasan bc9b00b
Refactor a check of notify_by_email
ozovalihasan 9463305
Fix tests of the notify_by_email feature
ozovalihasan 90f925e
Revert the last migration
ozovalihasan 86f4d71
Merge remote-tracking branch 'origin/master' into auto-dispatch
ozovalihasan 7b38c23
Update the timestamp of a migration
ozovalihasan e9ffc2a
Fix conditions used to show auto-dispatch input
ozovalihasan 2f01930
Fix typos of preview view
ozovalihasan 60fec69
Revert "Fix conditions used to show auto-dispatch input"
ozovalihasan a94a492
Remove an unnecessary validation from NotifyByEmail model
ozovalihasan a80d492
Update method used to validate a push
ozovalihasan d586a54
Refactor notify by email logic and tests
ozovalihasan d9afd89
Refactor notify by email availability logic and tests
ozovalihasan eee0c5b
Add a field to track recipients count
ozovalihasan cbb6e5b
Add `proceed_at` attribute to NotifyByEmail
ozovalihasan 0ef01b7
Remove a transaction
ozovalihasan ed098c2
Remove an unnecessary guard clause
ozovalihasan d31980c
Update multiple emails validator and tests
ozovalihasan 0678bd2
Remove `dependent: :destroy` from NotifyByEmail
ozovalihasan f17032d
Update secret_url's used by PushCreatedMailer
ozovalihasan 5cd83f7
Merge remote-tracking branch 'origin/master' into auto-dispatch
ozovalihasan 3b26d8f
Update response for Api::V2::PushesController#audit
ozovalihasan 5bb9e3a
Merge remote-tracking branch 'origin/master' into auto-dispatch
ozovalihasan 8c49dbb
Fix LogEvents changed mistakenly
ozovalihasan ed4e9a9
Update a parameter of PushCreatedMailer
ozovalihasan 9ce18bc
Update errors of notify by email feature
ozovalihasan f5b71f0
Add notify_by_email for madmin resources
ozovalihasan fde3d3f
Update text of a button
ozovalihasan c8d25b0
Update conditions of SendPushCreatedEmailJob
ozovalihasan e7c87fb
Update version info for email_auto_dispatch
ozovalihasan f13d1df
Add attributes for API responses
ozovalihasan 19d7af7
Update API response for the audit action of pushes
ozovalihasan e47b4a5
Add a field to track errors of notify_by_email
ozovalihasan 419b095
Update an event used to create notify_by_email
ozovalihasan 05fa4d2
Update parameters used for API requests
ozovalihasan fd4eb52
Update tests to reload Settings
ozovalihasan d1327ed
Update notify_by_email callback
ozovalihasan 859352a
Refactor tests
ozovalihasan ea26d71
Merge remote-tracking branch 'origin/master' into refactor-tests
ozovalihasan 92b6bcb
Refactor tests added lastly
ozovalihasan e5b203c
Remove unnecessary lines from a test suite
ozovalihasan f7ba47e
Add a mailer config for tests
ozovalihasan ad0a8cc
Update a test of ExpirePushesJobTest
ozovalihasan e0f7ab0
Update tests changing Settings
ozovalihasan f016290
Update tests using `reload_routes!`
ozovalihasan 7b22ab5
Remove redundant comparison
ozovalihasan 34a75e9
Merge remote-tracking branch 'origin/refactor-tests' into auto-dispatch
ozovalihasan 75d5126
Merge remote-tracking branch 'origin/master' into refactor-tests
ozovalihasan e0fafd5
Merge remote-tracking branch 'origin/refactor-tests' into auto-dispatch
ozovalihasan 2eb93fe
Update multiple tests
ozovalihasan bcb0a68
Add more model unit tests
ozovalihasan 97ab987
Remove model_name from error messages
ozovalihasan 1cfc108
Update SendPushCreatedEmailJob as SendNotifyByEmailJob
ozovalihasan 589dc83
Fix failing tests because of changing error message
ozovalihasan 06d5f0b
Update api documentation for locales
ozovalihasan 80cc733
Update attributes of NotifyByEmail
ozovalihasan 1b19bf7
Merge branch 'master' into auto-dispatch
pglombardo 895c51b
String updates
pglombardo 0348d1c
Add safety
pglombardo 45712f2
Use validated locale var
pglombardo 3b1f85b
fix: require auth and ownership check on API v2 notify_by_email
pglombardo 5168257
fix: add explicit auth and ownership check to web notify_by_email
pglombardo 47d026f
fix: don't append default locale to notify email URL
pglombardo 93c026f
Fix an encrypted column name
ozovalihasan c323323
Update regex used to replace `http` part of URLs
ozovalihasan a36aac4
Update a column name of a migration
ozovalihasan 93595ab
Update a rescue block
ozovalihasan de3e567
Add custom validations for notify_by_email feature
ozovalihasan f78539e
Refactor notify_by_email params
ozovalihasan 1e4604a
Refactor params assigned for notify_by_email model
ozovalihasan 00d9b3e
Remove an unnecessary test
ozovalihasan 672dc3d
Update name of a method
ozovalihasan 9c06011
Add a daily limit for emails sent to notify
ozovalihasan 7ae87e6
Update the mechanism used to track emails sent by users
ozovalihasan a1efced
Update style of a warning
ozovalihasan ecbd92f
Update tests of PushCreatedMailer
ozovalihasan 5a6917e
Update hardcoded error message with I18n translation in PushesController
ozovalihasan 6161835
Update validations coming with NotifiableByEmail concern
ozovalihasan ce87b7a
Update MultipleEmailsValidator
ozovalihasan d8fed62
Update SendNotifyByEmailJob to update successful sends better
ozovalihasan 2a4723f
Revert an unrelated change
ozovalihasan 3945a5d
Update name of a column of User
ozovalihasan a43a2ea
Add tests for NotifyByEmail
ozovalihasan 6cafe4b
Add a system test for notify by email feature
ozovalihasan 024eac9
Update a class method of Settings
ozovalihasan 4574946
Update a test of SendNotifyByEmailJob
ozovalihasan 9458919
Add a migration to remove a few columns from pushes table
ozovalihasan 480e23d
Merge remote-tracking branch 'origin/master' into auto-dispatch
ozovalihasan 896f804
Update a few JavaScript functions with replaceChildren
ozovalihasan 66e195e
Fix a test of NotifiableByEmail concern
ozovalihasan 689dd4e
Add aria-label for a button
ozovalihasan b1d760a
Fix an hardcoded text to be translated
ozovalihasan fab5059
Update error part to use a partial
ozovalihasan 6076c22
Refactor LogEvents
ozovalihasan 011f41b
Add `notify_by_email_available?` method for the NotifiableByEmail con…
ozovalihasan 3c469b6
Fix tests failing because of lack of user of some audit logs
ozovalihasan b2b87b7
Refactor notify_by_email validations
ozovalihasan 1eb31bc
Update an API response for Api::V2::PushesController
ozovalihasan 8f9371b
Update Api::V1::PushesController to handle notify_by_email parameters
ozovalihasan 395d3ce
Refactor LogEvents#log_creation_email_send
ozovalihasan f7133b7
Refactor AuditLog
ozovalihasan bbfe21a
Remove an unnecessary validation of SendNotifyByEmailJob
ozovalihasan 6ca5046
Remove an unnecessary if clause
ozovalihasan 9c0c70d
Update the preview page of pushes shown when an error with notify_by_…
ozovalihasan edbd0ea
Add a field of NotifyByEmail to show in madmin views
ozovalihasan 6fda534
Update tests related to notify_by_email action
ozovalihasan cdc277f
Update name of some hashes used in API controllers
ozovalihasan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| module Madmin | ||
| class NotifyByEmailsController < Madmin::ResourceController | ||
| end | ||
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| import { Controller } from "@hotwired/stimulus" | ||
|
|
||
| export default class extends Controller { | ||
| static targets = [ "menuButtonInner", "field" ] | ||
|
|
||
| connect() { | ||
| this.restoreSelectedValue(); | ||
| } | ||
|
|
||
| select(event) { | ||
| this.fieldTarget.value = event.currentTarget.dataset.lang; | ||
| const template = event.currentTarget.querySelector('template'); | ||
| this.menuButtonInnerTarget.replaceChildren(template.content.cloneNode(true)); | ||
| } | ||
|
|
||
| restoreSelectedValue() { | ||
| const selectedLang = this.fieldTarget.value; | ||
| if (selectedLang) { | ||
| const selectedOption = this.element.querySelector(`[data-lang="${selectedLang}"]`); | ||
| if (selectedOption) { | ||
| const template = selectedOption.querySelector('template'); | ||
| if (template) { | ||
| this.menuButtonInnerTarget.replaceChildren(template.content.cloneNode(true)); | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.