2.3.x branch: Update version of flexible_permissions required to version 2.0 (for Core 10.3 compatibility)

Created on 24 June 2024, 7 months ago
Updated 5 September 2024, 5 months ago

I am attempting to upgrade a client that was on Group 1.0 and Drupal Core 10.1.

The original goal was to upgrade them to Group 2.2.x and Drupal Core 10.2.7.

I was able to do this in a dev environment, but we had to overcome a few obstacles along the way:

  • We had to write an update hook to clean up orphaned group entities
  • We had to do a pre-deployment where we enabled Flexible Permissions
  • We had to refactor some deprecated functions in our custom code

We got to a point where a lot of things were working OK, but our one and only Group role prior to the upgrade ("Editor") was converted to an individually scoped role by the upgrade, and other roles were added by the upgrade to support outsiders for each of our core roles. I can see why the upgrade did this: it is helpful for someone unaccustomed to the new roles paradigm in versions 2.x and 3.x. But we needed our legacy Editor role to be an insider role in the new paradigm rather than an individual role.

Fortunately, scopes can be changed: but when we tried to edit this Editor role to change it to an insider scope, we got a fatal error, which we wrote a flexible_permissions patch πŸ› Missing user cacheContext in ChainPermissionCalculator causes fatal error with Group 2.2 Needs review to overcome.

With this patch, things are mostly working as we need, but the problem is the patch is submitted against version 1.x of Flexible Permissions, which makes us and our client uneasy about future updates. We understand Flexible Permissions is in core as of 10.3, but we see the note on the Flexible Permissions project page β†’ , which we think is advising the use of Flexible Permissions 2.0.0 (at least until the contrib dependency is removed in a future Group major release).

It has taken us several weeks to get this far, and now we should probably go ahead and upgrade the client's site to core 10.3, so we are attempting that now in our development environment.

This went smoothly and we also upgraded Group to 2.3.x-dev.

Should we be on flexible_permissions 2.0.0?

Do you have plans to update the 2.3.x-dev version of Group module to use version 2.0.0 of Flexible Permissions module?

✨ Feature request
Status

Active

Version

2.3

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States banoodle San Francisco, CA

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

Comments & Activities

Production build 0.71.5 2024