Install
Works with Drupal: ^9 || ^10Using Composer to manage Drupal site dependencies
Alternative installation files
Release notes
The "finally doing things right" release
You are viewing the release notes for the upgrade path from 8.x-1.x, new installs should use version 3.0.0
A lot of code has gone into the 8.x-1.x branch that I later ended up regretting. Time to clean house and get rid of it!
This release contains several reworks, new features and new APIs for you to work with. Please check out the change records for a full list of changes, but I'll list the key parts below.
New dependency: Flexible permissions
Download and enable this first before you upgrade: https://www.drupal.org/project/flexible_permissions
This module takes care of calculating and caching permissions for you. I figured this can be helpful for more modules than just Group so it's now a standalone API module.
Sponsored by ANNAI: Configuration entities can now be grouped
After years of feature requests, I was finally able to deliver this feature thanks to the generous sponsorship provided by ANNAI. You may now define any "relation plugin" (more on that below) for not only content entities, but also config entities.
To make this possible, we are wrapping config entities on a storage level, but as far as developer experience (DX) and user experience (UX) is concerned, it looks and feels exactly the same as what you are already accustomed to regarding content entities. Only developers dealing with direct storage manipulation need to be aware of this implementation detail.
Roles and their UI have been reworked
No more advanced outsider roles or any of that nonsense. You can now define one of three roles:
- You have a specific global role and are not a member of the group: Outsider
- You have a specific global role and are a member of the group: Insider
- You are a member of a group and want extra permissions on top of the above: Individual
This takes care of the silly scenario where you'd have advanced outsider permissions and lost them when you joined a group. Furthermore, this means the previous Anonymous, Outsider and Member roles are no longer special and they can therefore be deleted if not in use.
Query access is now fully custom, no longer uses Entity API
Group is too complex to put into simple condition groups. Custom joins are way faster and that's what we're going with now.
GroupContentEnabler is dead, all hail GroupRelationType
The end goal is to end up naming the plugins "GroupRelation" and their definitions "GroupRelationType" and have GroupContent become GroupRelationship entities. While class names have been renamed, machine names turned out to be a huge pain in the ass so instead I am releasing version 3.0.0 alongside 2.0.0 where this version keeps the old machine names and 3.0.0 uses the new. This buys you ample time to migrate your data from 2.0.0 to 3.0.0 or even 4.0.0 when it comes out, while still leaving you an upgrade path from 8.x-1.x.
Having said that, the plugin manager for the relation plugins now looks and feels a lot like the EntityTypeManager:
- The definitions are classes rather than arrays
- Each plugin can support multiple handlers for various purposes
- The actual plugin class is rather empty and focused solely on plugin tasks (such as building a config form)
A key difference is that plugins do not define their handlers in their annotations, but rather as services. See my presentation at Drupal Dev Days 2022 for a full rundown.
Read the CRs to figure out how to update your plugin or look at the GroupMembership or GroupNode plugins and handlers to get an idea.
Access checks no longer deny access when Group doesn't care
Before, if something was grouped and entity access was being checked, Group would return Forbidden if it couldn't grant access. Now, it only does that if it knows that it should deal with the given entity operation. If an entity operation is not declared, Group will not deal with it. This should make Group play more nicely with modules that expose custom entity operations until a patch is written that informs Group about these operations.
Access bypass permission is gone
I don't like all-access permissions or accounts. You can now flag any group role as an admin role and they will allow any operation now and in the future.