1

Can somebody tell me, how can i restrict viewing a certain-content type in an OG group to only group admin, so no other group members can see it.

And the 2nd question, if anibody knows; you can assign a field called group_audience. Is there an option, to not actually show the field, but assign a value of whatever group the user is in. Can I do this using hook_form_alter?

2 Answers 2

1

In your og node template you can use conditional php to show certain content.

<?php if (og_is_node_admin($group)):?>

 // Put whatever fields that you want viewable by the admin only

<?php endif;?>
2
  • So there is no module that would limit access for viewing the content?
    – Dark
    Commented Sep 15, 2011 at 20:37
  • The various content access modules would give you the ability to limit access for viewing specific fields and content types, but your assigning those permissions per role. I guess you could create a rule that adds a role to that use if they are a group admin, and then assign the appropriate content access permissions, but that seems like a lot of work compared to my answer.
    – user2014
    Commented Sep 15, 2011 at 20:51
0

Question #2: if anibody knows; you can assign a field called group_audience. Is there an option, to not actually show the field, but assign a value of whatever group the user is in. Can I do this using hook_form_alter?

Check out this comment. It shows you how to create a module that will do that.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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