Confirm route of delete multiple action uses wrong permission

Created on 20 March 2017, over 7 years ago
Updated 24 January 2023, over 1 year ago

Action id "message_delete_action" access looks like this:

  /**
   * {@inheritdoc}
   */
  public function access($object, AccountInterface $account = NULL, $return_as_object = FALSE) {
    return $account->hasPermission('adminster messages');
  }

But message.routing.yml uses different permission

message.multiple_delete_confirm:
  path: '/admin/content/message/delete'
  defaults:
    _form: '\Drupal\message\Form\DeleteMultiple'
  requirements:
    _permission: 'administer message templates'

As a result of this, user with only adminster messages permission isn't allowed to remove messages.

🐛 Bug report
Status

Closed: outdated

Version

1.0

Component

Code

Created by

🇫🇮Finland dropa

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024