Skip to content
Snippets Groups Projects
Commit 9360a2d9 authored by Kevin Paxman's avatar Kevin Paxman
Browse files

ISTWCMS-5544: make delete warning show for users with delete all media...

ISTWCMS-5544: make delete warning show for users with delete all media permission, e.g. site managers
parent a6d26ff3
No related branches found
No related tags found
No related merge requests found
......@@ -117,7 +117,7 @@ class UwDeleteFormEventSubscriber implements EventSubscriberInterface {
// The user has 'delete any' permission.
if ($key == 'media_names') {
if (($form['#form_id'] == 'media_' . $name . '_delete_form') &&
($this->currentUser->hasPermission('delete any ' . $name . ' media') ||
($this->currentUser->hasPermission('delete any media') || $this->currentUser->hasPermission('delete any ' . $name . ' media') ||
$this->currentUser->hasPermission('delete own ' . $name . ' media'))) {
$form['description']['#markup'] = $custom_waring_message;
break;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment