I have a group and a content type that *may* have groups as audience. Users that are not member of the group are not able to create such content at all, because og_node_access() only allows the creation if a group is available for the user.
I'm well aware of og_node_access_strict; disabling it would circumvent the issue. However, I think not letting any non-group create content is not what's advertised with that setting.

The attached patch checks whether the audience field is required, if not, it returns IGNORE.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

amitaibu’s picture

Priority: Critical » Normal

This makes sense. Can you please add a short test under OgNodeAccess?
(Not critical as 2.x isn't released yet)

amitaibu’s picture

Assigned: Unassigned » amitaibu
Status: Needs review » Fixed

I've overhauled the patch and added tests.

Tim-Erwin’s picture

Assigned: amitaibu » Unassigned
Status: Fixed » Needs review

Thanks a lot!

Tim-Erwin’s picture

Status: Needs review » Fixed

ups, sorry, no idea why the tags got reset, everything is fine, of course

Status: Fixed » Closed (fixed)

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