Score:0

Custom entity access control based on group membership

ph flag

I am using the group module in Drupal 9 to control access to content by user groups.

I have a custom entity defined as a single table unfieldable entity. The entity has a "group ID" base field defined.

I want to add an access controller that checks if an entity is associated with a group the user is a member of.

Is there a simple way to do this, or I do I need to go down the rabbit hole of creating a group content enabler? That approach seems overly complex for my use case.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.