Permissions has to be revoked after deleting a search api view

Created on 21 December 2022, almost 2 years ago
Updated 7 May 2023, over 1 year ago

Problem/Motivation

In Drupal 10 permission must exist. After a search API view is deleted permissions like 'use search_api_autocomplete for ' . $id should be revoked from all roles, otherwise, a runtime exception will be thrown in the future.
See https://www.drupal.org/node/3193348

Steps to reproduce

  • Create a search API view
  • Add authenticated role the "use search_api_autocomplete for" permission
  • Check if permission is written in user.role.authenticated.yml configuration
  • Delete the view created in step 1
  • New config export shows that permission is still in the yml
  • A runtime exception is not thrown

Proposed resolution

Revoke permission in view_delete hook

🐛 Bug report
Status

Fixed

Version

1.0

Component

General code

Created by

🇩🇪Germany mvogel

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