I have been struggling for a day with trying to get og_access and tac_lite to play nice with each other. My use case is that I was trying to limit access to most content types that were tagged with a particular vocabulary using tac_lite, to users and roles granted access. This worked well.

When I wanted to associate organic group content with this same vocabulary that is used to tie everything together, in addition to limiting access by OG members, I ran into problems. The issue was that anything that was tagged in the vocabulary used for tac_lite was entirely ignored by og_access, so any user with the vocabulary access could access private groups and posts, regardless of their membership.

After reading a bit about Drupal's ACL system, it seems that adjusting the grant priority for one module relative to the other would resolve issues where they were fighting with each other over who gets to speak first (or last?). This patch adds an additional setting on the general Organic group settings page (I wasn't sure where else to stick it, though it can be easily moved to another form) on admin/config/group/settings that allows an administrator to adjust the node grants priority of og_access. The option is only visible if og_access is turned on, and after changing the priority, it will force the permissions to be rebuilt.

The only other change was to actually store the modified grants priority in og_access_node_access_records() by reading the priority from a variable. In my very limited testing it seems to have resolved all of my woes when the priority was set to a positive number. This should address conflicts with other ACL modules as well.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

agentrickard’s picture

Status: Needs review » Needs work

The last submitted patch, og_access_priority.diff, failed testing.

vgalindus’s picture

FileSize
4.19 KB

I think this patch is ok. Tested and solved the problem I had with ACL. In my case I needed a negative value to make it play with flexiaccess, but solution is simple. Why it is not accepted? If tests are needed I can help writing them.

Patch for 7.x-2.2 stable release.

PS: thx for saving my time ;)