I am trying to allow non members to create content inside a group which is public but I am not able to.

The permission to allow non members to create content inside a group is always not selectable and looking to the code only members are allowed to post in groups.

Is there a way to override this?

Thanks!

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

amitaibu’s picture

This will be a non-trivial feature, mostly because it will need to find a scalable solution. Not on my immediate todo list, but would love to get a patch for it :)

hernani’s picture

I would be interested in helping on this one. Looking to the code I see there are some concerns about scability but I think it should be doable with a new widget/some config for the current widgets.

Amitai, can you share some ideas how do you see this better resolved? A new widget or some extra configuration in the current ones would be the best way to go?

amitaibu’s picture

I would be interested in helping on this one.

Great!

can you share some ideas how do you see this better resolved?

  1. The problem with letting non-members is that we need to iterate over all the groups that have this permission. We can join some of the tables as they are fields (e.g. settings if the group has default or overridden roles and permissions). So I suspect we'll need a new normalized table {og_non_members_create} that will hold: node_type (the node type that should be created} group_type, group_bundle, group_id
  2. Next when group-type is a node, we'll need to pass it via the {node_access}
  3. As for the widget, there's already the "My group"/ "Other groups" complex widgets for admins. For a non-admin user, we can show something similar

Is the above clear enough?

okeefferd’s picture

Has there been any traction on this issue? I am using groups for service delivery teams with two type of content: hard content requiring group members create/edit via approvals and soft content which non-members should be able to create. Without this feature, all content needs to be submitted by a member, or all users of the site must be a member of some type.

Renee S’s picture

FileSize
21.3 KB

Here is a patch my co-op @BPm wrote for me. Test plz! :)

Renee S’s picture

FileSize
20.26 KB

Oops. Sorry. Accidentally included one commit too soon. This one should be good. It does need work, though, so: go :)

One note, currently it is set up to allow non-members to post to a group only if the group is public. I think it might be better if that was an option, because I don't subscribe to the idea that private groups should be invisible, but that can wait...

okeefferd’s picture

Status: Active » Needs review

Status: Needs review » Needs work

The last submitted patch, og-non-member-create.patch, failed testing.

Renee S’s picture

Version: 7.x-2.0-beta2 » 7.x-2.x-dev
Status: Needs work » Needs review
FileSize
13.56 KB

Yikes, yeah, that was a bit of a mess. Rolled against current dev.

Status: Needs review » Needs work

The last submitted patch, og-non-member-create.patch, failed testing.

Renee S’s picture

Status: Needs work » Needs review
FileSize
13.95 KB

Status: Needs review » Needs work

The last submitted patch, og-non-member-create.patch, failed testing.

amitaibu’s picture

Status: Needs work » Closed (duplicate)