If you have a og_membership_reference field on your users then Og::isGroupContent($entity_type_id, $bundle_id) will return TRUE because isGroupAudienceField treats OgGroupAudienceHelper::USER_TO_GROUP_REFERENCE_FIELD_TYPE as audience field and then basically game over. There's nothing in og_entity_access which would allow this and so we reach return AccessResult::forbidden(); at the end. I am not even sure why do we have that in the end. Do we want to be judge of all worlds and deny forbid everything ourselves? Are we not neutral at this point?
If you have a
og_membership_reference
field on your users thenOg::isGroupContent($entity_type_id, $bundle_id)
will returnTRUE
becauseisGroupAudienceField
treatsOgGroupAudienceHelper::USER_TO_GROUP_REFERENCE_FIELD_TYPE
as audience field and then basically game over. There's nothing inog_entity_access
which would allow this and so we reachreturn AccessResult::forbidden();
at the end. I am not even sure why do we have that in the end. Do we want to be judge of all worlds and deny forbid everything ourselves? Are we not neutral at this point?