Closed ekes closed 3 months ago
Good idea. I wonder how much time this would take?
If we can estimate the size of the job and upgrade paths, we can assess.
Well the migration to a field, supplied with modules, and a new hook... straightforward. I've done a fair bit when prodding.
However I am reminded why going for group_permissions in the first place was more 'straightforward'. As the group routes to create content, and probably other custom /group/{group}/... routes, use the plugin access which doesn't look at the entity_access hooks at all.
So we'd do entity access hooks and add additional access checks on specific routes or decorate the access service plugin further -- thinking about it the later might be best. But, it'd probably still be better for performance rather than entering the calculator on a per-group basis as group_permissions does, and it'd be 'simpler'. So probably still worth it for what we need which is the impression of particular content types per site and simple ui without the additional types.
Added this issue to write some tests: https://github.com/localgovdrupal/localgov_microsites_group/issues/464
Optional: see if this can be better done with a permissions service per group domain context
https://github.com/localgovdrupal/localgov_microsites_group/pull/470
Add more tests to ensure this is working correctly.
https://github.com/localgovdrupal/localgov_microsites_group/pull/469
https://github.com/localgovdrupal/localgov_microsites_group/pull/470 has been merged and released.
I think this can be closed, thanks @ekes !
_Originally posted by @ekes in https://github.com/localgovdrupal/localgov_microsites_group/issues/427#issuecomment-1772527308_