Index: main/plugin-web/plugin.xml =================================================================== --- main/plugin-web/plugin.xml (revision 43460) +++ main/plugin-web/plugin.xml (working copy) @@ -6994,6 +6994,10 @@ + + + + + + + + + users = new HashSet<>(); for (String right : _pagePublicationEndRights) { - users.addAll(_rightManager.getAllowedUsers(right, page)); + users.addAll(_rightManager.getAllowedUsers(right, page).actualAllowedUsers(Config.getInstance().getValueAsBoolean("runtime.mail.massive.sending"))); } List params = _getPagePublicationEndParams(page); Index: main/plugin-web/src/org/ametys/web/content/consistency/ContentConsistencyEngine.java =================================================================== --- main/plugin-web/src/org/ametys/web/content/consistency/ContentConsistencyEngine.java (revision 43460) +++ main/plugin-web/src/org/ametys/web/content/consistency/ContentConsistencyEngine.java (working copy) @@ -43,6 +43,7 @@ import org.ametys.core.user.UserIdentity; import org.ametys.plugins.repository.AmetysObjectIterable; import org.ametys.plugins.repository.AmetysRepositoryException; +import org.ametys.runtime.config.Config; import org.ametys.runtime.i18n.I18nizableText; import org.ametys.web.repository.site.Site; import org.ametys.web.repository.site.SiteManager; @@ -220,7 +221,7 @@ @Override protected void _sendErrorEmail() throws IOException { - Set users = _rightManager.getAllowedUsers(_MAIL_RIGHT, "/contributor"); + Set users = _rightManager.getAllowedUsers(_MAIL_RIGHT, "/contributor").actualAllowedUsers(Config.getInstance().getValueAsBoolean("runtime.mail.massive.sending")); Map params = _getEmailParams(); Index: main/plugin-web/src/org/ametys/web/repository/comment/SendMailToContributorCommentListener.java =================================================================== --- main/plugin-web/src/org/ametys/web/repository/comment/SendMailToContributorCommentListener.java (revision 43460) +++ main/plugin-web/src/org/ametys/web/repository/comment/SendMailToContributorCommentListener.java (working copy) @@ -134,7 +134,7 @@ if (comment.isValidated()) { // Determine the list of listeners - users = _rightManager.getAllowedUsers("CMS_Rights_CommentNotified", content); + users = _rightManager.getAllowedUsers("CMS_Rights_CommentNotified", content).actualAllowedUsers(Config.getInstance().getValueAsBoolean("runtime.mail.massive.sending")); // Prepare mail List i18nparam = new ArrayList<>(); @@ -159,7 +159,7 @@ else { // Determine the list of listeners - users = _rightManager.getAllowedUsers("CMS_Rights_CommentModerate", content); + users = _rightManager.getAllowedUsers("CMS_Rights_CommentModerate", content).actualAllowedUsers(Config.getInstance().getValueAsBoolean("runtime.mail.massive.sending")); // Prepare mail List i18nparam = new ArrayList<>(); @@ -227,7 +227,7 @@ String body; // Determine the list of listeners - users = _rightManager.getAllowedUsers("CMS_Rights_CommentNotified", content); + users = _rightManager.getAllowedUsers("CMS_Rights_CommentNotified", content).actualAllowedUsers(Config.getInstance().getValueAsBoolean("runtime.mail.massive.sending")); String webpart = ""; if (content instanceof WebContent)