Does not work alongside content_access module

Created on 13 February 2025, 6 months ago

Problem/Motivation

I use the content_access module to control access to non group content in my site.

I want to be able to use og_access to control access to group content.

when content_access is not installed this module seems to work as expected. However, when content_access is installed, I am unable to get the two to play nice with each other.

Steps to reproduce

If on my group node type if have access for anonymous users unchecked, and the group set to public. Anonymous users cannot view the node.

However, if I do check access for anonymous users for content_access on my group node type, then private groups are visible by anonymous/non-members.

content_access has an advanced setting for "node grants priority" however no matter what i set this to it does not make a difference.

I am rebuilding permissions and clearing cache after each time I change a setting on either and still no luck.

🐛 Bug report
Status

Active

Version

1.0

Component

Code

Created by

🇺🇸United States loze Los Angeles

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @loze
  • 🇺🇸United States loze Los Angeles
  • 🇺🇸United States loze Los Angeles
  • Status changed to Postponed: needs info 11 days ago
  • 🇨🇦Canada joelpittet Vancouver

    That sounds rough — permissions can definitely be tricky. I’m guessing you may have already tried this, but just to confirm: when you’ve uninstalled either og_access or content_access, did the expected results come back? That could help confirm whether it’s the interaction between the two or something else.

    A couple of things that might help narrow it down:

    1. Run drush php-eval 'node_access_rebuild();' after changing module combinations.
    2. Check the hook_node_grants() output from both modules to see which one’s taking precedence.
    3. Temporarily disable one module’s hook_node_grants() to confirm the other is working as expected.

    And last question, are you using 2.x or 1.x of OG? I just split this modules branches based on that because of some type hinting incompatibility.

Production build 0.71.5 2024