og_user_access_entity() can be used to check organic groups access for a user on an entity based on the group of the entity.

This finds the groups for the entity passed in and then calls og_user_access(). og_user_access_entity() does not use the $skip_alter or $ignore_admin parameters of og_user_access meaning that these can never be set to TRUE when using this function.

I propose adding the two parameters to og_user_access_entity() with the same defaults as og_user_access() which will allow this functionality to be used without changing any existing behaviour.

Patch to follow.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

justanothermark’s picture

Patch to extend og_user_access_entity().

amitaibu’s picture

Status: Active » Needs review
brt’s picture

The patch from #1 works perfectly for me

brt’s picture

Status: Needs review » Reviewed & tested by the community

amitaibu’s picture

Status: Reviewed & tested by the community » Fixed

Merged, thanks.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.