- Issue created by @herved
- 🇮🇱Israel amitaibu Israel
Thank you @herved, the idea of leveraging the access API has indeed came up in the past, and it would be a nice addition. So happy to see your PoC!
Specifically, for your use case, I would approach it by adding a new "CoC member" OG Role. A "regular" Member wouldn't have those permissions.
Remember that `Create Content` is a bit more complex, since at the time the user is presented the form to create the content, that non-saved content doesn't belong to any group yet. So you'd have to rely on some `OG Context`/ prepopulating the reference to the group.
- 🇧🇪Belgium herved
POC branch added, functional and kernel tests are passing, I only skipped unit tests.
I left a few todos.My only major concern on this approach is that although the AccessPolicyProcessor caches things (statically and persistently) it can get quite expensive to load all memberships and groups to compute all permissions for a user, especially if he belongs in thousands of groups. Although that seems to be what drupal/group does...
- 🇧🇪Belgium herved
Thank you both, this is still a rough POC.
Indeed maybe using a "validated-member" OG role could be a good compromize for now.