Grant new permissions according to old permissions when updating

Created on 2 September 2023, 10 months ago
Updated 17 October 2023, 8 months ago

Problem/Motivation

Taxonomy access fix module got a lot of new permissions in version 4. Each site using this module is going to need a config change along with the version update to accommodate.

Previously we had just the Reorder and View terms permissions, so now that there are more granular permissions, they should follow the role granting logic in place, not to force every site to review and manually update permissions.

Proposed resolution

Roles with Reorder terms in ... should logically match the new Reset (order of terms) permission after the update.
Roles with View terms in ... should logically match new permissions starting with View or Select after the update.

πŸ› Bug report
Status

Closed: works as designed

Version

4.0

Component

Code

Created by

πŸ‡ͺπŸ‡ΈSpain juanolalla

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

Comments & Activities

  • Issue created by @juanolalla
  • πŸ‡ͺπŸ‡ΈSpain juanolalla

    Uploading patch solving the issue.

  • Status changed to Needs review 10 months ago
  • Open in Jenkins β†’ Open on Drupal.org β†’
    Core: 10.0.7 + Environment: PHP 8.1 & MySQL 8
    last update 10 months ago
    10 pass, 1 fail
  • Status changed to Postponed: needs info 10 months ago
  • πŸ‡©πŸ‡ͺGermany FeyP

    Thanks for filing this issue.

    The module already provides an upgrade path for those new permissions, that were previously part of other old permissions. See the update hooks 9401 and 9402.

    For the other permissions, these were not previously covered by any existing permissions, they are entirely new and allow different things. We can't just give arbitrarily new permissions to roles they didn't have before. It may seem "logical" for your project, but we can't assume that it will be the case for all projects that use the module. That's why the update hooks also ask you to review the newly assigned permissions, so that you can take the opportunity of the upgrade to make changes as necessary.

    I'm not closing this as won't fix yet, because I wonder why you needed to add "view terms in VOCABULARY" to "view term names in VOCABULARY" (provided by 9401) and "view terms in VOCABULARY" to "select terms in VOCABULARY" (provided by 9402). Didn't those update hooks work for you? If so, can you tell us your module and core versions before and after the upgrade and also if you upgraded in multiple steps or a single step?

  • Status changed to Closed: works as designed 9 months ago
  • πŸ‡©πŸ‡ͺGermany FeyP

    No response within a month. Closing works as designed for now. Feel free to reopen with more information.

  • πŸ‡ͺπŸ‡ΈSpain juanolalla

    Sorry I couldn't answer before. If new permissions are added you're forced to make a new decision, whether to grant or not that permission. If you don't do anything, would mean your users will stop be allowing to do things that they could before, but now they can't because there is a new not granted permission. We tried to apply the most common logic case we thought should be the default.

Production build 0.69.0 2024