Fixed bug in cancelling scheduled send - If campaign was scheduled to be sent, a checkbox was still shown on the campaign status page. This gave wrong impression that by unchecking the checkbox, the scheduling is cancelled. Checkbox is removed now and the "Pause" button has be renamed to "Cancel scheduling"
Added default role for campaign admin that administer multiple namespaces.
Campaigns list is now by default ordered by 'Created' in descending order.
Fixed display bug - two clicks on main menu item made it disappear
Campaign Status is now protected by 'view' permission. (Up till now it was 'viewStats' permission.)
Fixes in campaign status to hide send buttons and test send button if a user does not have necessary permissions.
Templates, Mosaico templates and Campaigns (edit and content) are now displayed to user even if the user does have only 'view' permission (not 'edit'). A banner is displayed that the user cannot save any changes and buttons are removed from the edit pages. This is to allow users to copy settings and content from existing campaigns which they are not supposed to edit. A better solution would be to display the edit and content form in read-only mode, but this seems to be a bit complicated.
- More options how to send test emails.
- Fixed problems with pausing a campaign (#593)
- Started rework of transactional sender of templates (#606), however this contains functionality regression at the moment because it does not interpret templates as HBS. It needs HBS option for templates as described in https://github.com/Mailtrain-org/mailtrain/issues/611#issuecomment-502345227
TODO:
- detect sending errors connected to not able to contact the mailer and pause/retry campaing and queued sending - don't mark the recipients as BOUNCED
- add FAILED campaign state and fall into it if sending to campaign consistently fails (i.e. the error with sending is not temporary)
- if the same happends for queued email, delete the message
The namespace filter in campaigns was dropped (i.e. "Work with campaign's namespace"). Instead, we need a universal solution. For instance a namespace slector somewhere in the top-right corner, which should apply to everything (not just campaigns).
Nevertheless, I kept the ...-by-namespace rest endpoints and related functions in models because they will be useful for implementing the universal namespace selection feature.