Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
#1 | og-extend-access-entity-2451857-1.patch | 1.92 KB | justanothermark |
Comments
Comment #1
justanothermark CreditAttribution: justanothermark commentedPatch to extend og_user_access_entity().
Comment #2
amitaibuComment #3
brt CreditAttribution: brt commentedThe patch from #1 works perfectly for me
Comment #4
brt CreditAttribution: brt commentedComment #6
amitaibuMerged, thanks.