From c06c1a1aee831f3b9f701ac9e5fe12c45521705b Mon Sep 17 00:00:00 2001 From: "Peter Droogmans (attiks)" Date: Thu, 19 Sep 2024 16:31:03 +0200 Subject: [PATCH] feat: Moderate reports Refs: #RW-1058, #RW-1064 --- .../reliefweb_moderation/src/Services/ReportModeration.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/html/modules/custom/reliefweb_moderation/src/Services/ReportModeration.php b/html/modules/custom/reliefweb_moderation/src/Services/ReportModeration.php index 50d214e32..0e3923b8d 100644 --- a/html/modules/custom/reliefweb_moderation/src/Services/ReportModeration.php +++ b/html/modules/custom/reliefweb_moderation/src/Services/ReportModeration.php @@ -7,6 +7,7 @@ use Drupal\Core\Session\AccountInterface; use Drupal\Core\Url; use Drupal\reliefweb_moderation\EntityModeratedInterface; +use Drupal\reliefweb_moderation\Helpers\UserPostingRightsHelper; use Drupal\reliefweb_moderation\ModerationServiceBase; use Drupal\reliefweb_utility\Helpers\UserHelper; @@ -109,6 +110,8 @@ public function getRows(array $results) { // Country and source info. $info = []; + // User posting rights. + $info['posting_rights'] = UserPostingRightsHelper::renderRight(UserPostingRightsHelper::getEntityAuthorPostingRights($entity)); // Country. $country_link = $this->getTaxonomyTermLink($entity->field_primary_country->first()); if (!empty($country_link)) { @@ -316,6 +319,7 @@ protected function initFilterDefinitions(array $filters = []) { 'original_publication_date', 'author', 'user_role', + 'posting_rights', 'reviewer', 'reviewed', 'comments',