Needs work
Project:
Open Atrium
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
22 Jan 2016 at 23:36 UTC
Updated:
17 Feb 2016 at 22:20 UTC
Jump to comment: Most recent
The oa_core_node_access() function denies users from creating nodes that have a group audience field on them. It denies every type but 'oa_space' (aka OA_SPACE_TYPE). This makes it check on content rather then for the field itself.
http://cgit.drupalcode.org/oa_core/tree/includes/oa_core.access.inc?id=c...
This patch uses og_is_group_type() http://www.drupalcontrib.org/api/drupal/contributions!og!og.module/funct... instead.
We were getting "Access Denied" when creating a content piece that had a Group Audience Ref field associated with it.
| Comment | File | Size | Author |
|---|---|---|---|
| oa_core_node_access.patch | 746 bytes | robloach |
Comments
Comment #2
robloachComment #3
bobbygryzyngerI am experiencing a similar issue. The way that I would expect this to work is that group members with appropriate access privileges within their group should be able to create group content regardless of space context.
Comment #4
mpotter commentedNo, this patch is not correct.
The og_is_group_content_type() is there to handle "create" access to any group-content (like events, discussions, etc). You don't want to get rid of that. If you want to check any group type instead of just OA_SPACE then you'd replace the OA_SPACE check with og_is_group_type(). I think you replaced the wrong part of the conditional with og_is_group_type().
The comment in #3 is a bit different. Yes, your permission in the Group will take affect, but only if that Group is a parent (or otherwise inherited parent) of the Space. If you are in a Group that allows you to create Spaces, you can't create a space anywhere on the site. You can only create spaces within other spaces that your Group is a parent of. That's by design.
If you want to give users access to create a space anywhere, put them into a top-level Group that is the parent of the home space (top space) of the site.
Comment #5
Argus commented