selective newsletter for space admins#3
Conversation
isaacmg410
left a comment
There was a problem hiding this comment.
@agustibr good job!
@tramuntanal we are waiting your review :)
tramuntanal
left a comment
There was a problem hiding this comment.
Simple solution 👍 I thought it would be harder. Great job @agustibr!
Just some readability improvements
decidim-assemblies/app/queries/decidim/assemblies/admin/admin_users.rb
Outdated
Show resolved
Hide resolved
decidim-conferences/app/queries/decidim/conferences/admin/admin_users.rb
Outdated
Show resolved
Hide resolved
|
Thanks for the review and the suggestions @tramuntanal 😃 |
113106f to
bc0317c
Compare
|
@tramuntanal all checks green! ✔️ ✔️ |
|
@tramuntanal Can this PR be merged? The changes you have requested have been applied? If so, can you approve the PR? |
| .participatory_spaces.call(current_organization)&.published&.order(title: :asc) | ||
| end | ||
|
|
||
| def spaces_user_can_admin |
There was a problem hiding this comment.
is this method returning spaces_user_can_admin_as_options_for_select?
There was a problem hiding this comment.
Returns the structure for the select, used in:
decidim/decidim-admin/app/helpers/decidim/admin/newsletters_helper.rb
Lines 36 to 41 in c00248d
but it's also used to check which spaces the user can manage:
decidim/decidim-admin/app/helpers/decidim/admin/newsletters_helper.rb
Lines 15 to 16 in c00248d
| @spaces_user_can_admin | ||
| end | ||
|
|
||
| def space_datum(space) |
There was a problem hiding this comment.
space_as_options_for_select?
* initial commit selective newsletter * working on queries recipients * working on queries * improve view * start querying scopes * send newsletter to users, pending filter participants * some new improvements on selective newsletter * initial queries filtering participants * run rubocop to fix offenses * remove unnecessary css * change no_recipients and recipients_query * adding some translations * add some translations * extract participants code to each module * add class to select option * fix lint errors * fix rubocop offenses * missing locales and fix i18n specs * add documentation * add changelog line * remove unnecessary comma * working specs * wip working on specs * fix offenses * fix rubocop lambda * working with specs newsletter * improve specs query * fix rubocop on decidim dev * improve specs * add newsletters js to manifest and fix newsletter helper * change translation from any to none * selective newsletter for space admins (#3) * selective newsletter for space admins * refactor space_allows_admin_access? to be more performant * improve spaces_user_can_admin memoization * update CHANGELOG entry * renamed admin_newsletter_action? to apply_newsletter_permissions_for_admin! * update (space)_user_admins return user objects not ids * rename Decidim::Admin::NewslettersHelper#space_datum to :space_as_option_for_select * fix rubocop offense * A space admin can't send to all users * add space admin user examples to deliver_newsletter_spec * remove comments
* revert keys type in smtp_settings from symbol to strings * switch smtp_settings keys from symbols to strings * Fix smtp settings specs (#2) * light cleanup application mailer specs * add tests in register organization specs * Revert "Fix smtp settings specs (#2)" (#3) This reverts commit 9838bec. * Update organization seeds (#1) * Update organization seeds * Fix migration * Clean tests * Complete migration by adding down * Fix smtp settings specs (#4) * light cleanup application mailer specs * add tests in register organization specs * Remove migration and update CHANGELOG * Remove CHANGELOG entry Co-authored-by: Quentin Champ <26109239+Quentinchampenois@users.noreply.github.com> Co-authored-by: Armand Fardeau <armandfardeau@users.noreply.github.com>
🎩 What? Why?
Adds the ability of sending (selective) newsletters to space admins.
📌 Related Issues