0

Our organic groups is set up so that any authenticated user can create a group. What we need is for any group created to be private (accessible only to group members), but if the creator requests it be public, then the group is initially created as private and be in a published usable state, but a request will be sent to a groups admin for the group to be public (which will then list it in a group directory and anyone can request to join).

I'm using Drupal 7 and the latest version of OG. I have it set up so the group visibility defaults to private right now.

Any way to do this with rules? I've tried creating a "list in public directory field" associated with the group content type and then I figured when a group was added, a rule could check if that field was checked and do some event to notify an admin. But I'm not sure where to start with the "React on event" drop down as it doesn't seem anything suits what I'm trying to do.

I'm open to other ideas.

  • What do you mean by private and public groups? If you mean content types I think it's not going to work, I believe you can't change the content type can't be changed later. If you want to change the behaviour of registration forms and visibility manually and per group, that should be possible. In that case, create a rule "After saving content" since groups are nodes. – Turion Mar 13 '13 at 22:36
  • @Turion, sorry, I did not get notified there was a comment so I'm slow to reply. I do not mean 2 different content types. I mean the group visibility; public vs private. I need the user to choose public or private. If public is chosen, group will be created private but message sent to an admin who will change visibility to public if group meets specific criteria. – Cookie Monster Mar 26 '13 at 2:32
  • I still don't understand. Are you using the og access control module? – Turion Mar 27 '13 at 11:27
  • @Turion, yes I am using og access control. Any authenticated user can create a group. Any group created must initially be private. But on the group create form, there needs to be a way for the user to request public (via the private/public radio buttons or another way). If public is requested, a notification/email is sent to an admin, who would review the group and decide if it can be publicly listed and then manually change the group to publicly visible. While waiting for approval, the group is usable in a private state. I hope I am making more sense? Sorry for causing confusion. – Cookie Monster Mar 27 '13 at 16:03
0

After having lots of fun with rules, I have found a solution. Whew!

I created a rule:

Events: 
Before saving content

Conditions: 

Content is of type - Parameter: Content: [node], Content types: Community Group

AND

Data comparison - Parameter: Data to compare: [node:group-access], Data value: Public - listed in the...

Elements:

Set a data value - Parameter: Data: [node:group-access], Value: Private - accessible only...

I also send an email and show a message on the site, but that's not to important to the nitty gritty of the rule.

The purpose of my rule is that when a user selects "public" for a group, that the group is created as "private" but a request is sent to a Group Admin to review and change to public once approved. In the meantime, the user can still add members and use the group in a private state.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.