Skip to content

Commit

Permalink
Revert "DAMO-340 | Disabled Asset approval menu item for Agencies."
Browse files Browse the repository at this point in the history
This reverts commit d1b49a6.
  • Loading branch information
l-besenyei authored and adam-herczeg committed Jul 5, 2024
1 parent 60e1f24 commit 15b2e4c
Showing 1 changed file with 14 additions and 17 deletions.
31 changes: 14 additions & 17 deletions modules/damopen_common/src/Plugin/Block/HeaderMenuBlock.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,23 +63,20 @@ public function build() {
];
}

/*
* TODO: Review case to view own unpublished assets.
if (array_intersect($roles, $view_own_unpublished)) {
// Count all unpublished media.
$query = \Drupal::entityQuery('media')
->condition('status', 0)
->condition('uid', $current_user->id())
->accessCheck(TRUE);
$count = $query->count()->execute();
$menu['manage_assets'] = [
'title' => new TranslatableMarkup('Assets waiting for approval'),
'url' => Url::fromRoute('view.unpublished_assets.user_unpublished_assets')->toString(),
'class' => '',
'count' => $count,
];
}
*/
if (array_intersect($roles, $view_own_unpublished)) {
// Count all unpublished media.
$query = \Drupal::entityQuery('media')
->condition('status', 0)
->condition('uid', $current_user->id())
->accessCheck(TRUE);
$count = $query->count()->execute();
$menu['manage_assets'] = [
'title' => new TranslatableMarkup('Assets waiting for approval'),
'url' => Url::fromRoute('view.unpublished_assets.user_unpublished_assets')->toString(),
'class' => '',
'count' => $count,
];
}
// Add the user menu.
$menu['user'] = [
'view' => [
Expand Down

0 comments on commit 15b2e4c

Please sign in to comment.