Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
A client requested their Mass Contact categories be renamed to better suit their needs. They have a number of roles on the site and each has differing access to the available categories. This module creates permissions for each of the categories based off of the user-entered name instead of their internal ID and that ultimately leads to existing permissions being removed from roles and a new permissions created when the category name changes.
Proposed resolution
Name the permissions based on the internal ID instead of the user-entered name.
Comments
Comment #2
dasginganinjaRenaming the permissions based on the ID would break all existing implementations and there should be a hook_update function that runs to update existing permissions to the new values.