- Issue created by @prudloff
- 🇫🇷France prudloff Lille
Actually, I'm not sure this module is needed anymore : https://www.drupal.org/node/3268112 →
- Status changed to Needs review
8 months ago 11:36am 13 March 2024 - 🇫🇷France prudloff Lille
I tried running our Behat tests with and without this module and I get different results when testing access to group members, so the module might still be useful (at least for backwards compatibility, I have not checked if the same result can be achieved without the module by tweaking the group configuration).
We have been working with this outsider-in module for al longtime with Group v1, now that we are finally updating to v2 we hoped that this module wasn't needed anymore. So we disabled the module and... but outsider permissions are not looked at if you are a member of a group.
hasPermissionInGroup
// Then check their synchronized access depending on if they are a member. if ($this->groupMembershipLoader->load($group, $account)) { $item = $calculated_permissions->getItem(PermissionScopeInterface::INSIDER_ID, $group->bundle()); } else { $item = $calculated_permissions->getItem(PermissionScopeInterface::OUTSIDER_ID, $group->bundle()); }
Which I guess makes sense for some projects, but in my project we have around 250 groups as we use them to relate departments to users. So adding a role for a user for all groups is a lot of work to manage.
I'll take a look at the merge request and hope that it helps for my project.
With a patch for this MR I still don't get the outsider permissions for group members.
I haven't put much time in figuring out why. For my use-case it is easier for now to patch the group module than figuring out why the module isn't working. As it is just 1 line of code I need to change so that is uses the insider AND outsider scope.But having the module working is probably better as it is easier to toggle on/off and it doesn't seem likely this behavior will ever change in the group module.
Turns out, I'm very wrong in my earlier conclusion. Group 2.x has no need for the outsider-in module, but it does require some figuring out how the scopes work. I wouldn't say it is very intuitive and on a large project with lots of group and global roles, it will become a bit complicated, but with the individual, outsider and insider permission scopes it is very flexible.
I was able to configure my global role to sync with an insider role and it works as designed and more importantly, what I need for my use-case.