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.
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.
Comment | File | Size | Author |
---|---|---|---|
allow-content-creation-outside-groups.patch | 699 bytes | Tim-Erwin | |
Comments
Comment #1
amitaibuThis makes sense. Can you please add a short test under
OgNodeAccess
?(Not critical as 2.x isn't released yet)
Comment #2
amitaibuI've overhauled the patch and added tests.
Comment #3
Tim-Erwin CreditAttribution: Tim-Erwin commentedThanks a lot!
Comment #4
Tim-Erwin CreditAttribution: Tim-Erwin commentedups, sorry, no idea why the tags got reset, everything is fine, of course