For a user with no content creation rights outside of group context but who is a group manager, when in the group context, the "Create Content" link shows up in the main navigation menu block, but it links to website.com/node/add, which returns Access Denied.

I know that pre-rewrite there was an option to delete that link in group context but it does not appear to be a part of the current 6.x-4.x rewritten version. So I was wondering if there is an elegant (or any) way to remove that link or alter it so that it points to an "in-group-context" content creation page, or is this a symptom of something gone wrong on my installation?
Any help or advice is appreciated. Thanks!

Comments

MikeBC’s picture

edit: this might be the same issue as here: http://drupal.org/node/535738 but that is apparently for version 6.x-1.5 . . .

MikeBC’s picture

FWIW, here is my workaround for the above issue:

In the block settings for the Navigation menu block, I turn on "Show if the following PHP code returns TRUE (PHP-mode, experts only)."

and enter the following PHP:

$group_node = og_get_group_context();
if (!isset($group_node->title)) {
   return TRUE;
}

this returns TRUE only if the page is NOT part of OGUR's "group context", which means that the nav menu is turned off inside the group context. then you can build a separate menu block with only the links you want and use this code to have it's block show up only in group context:

$group_node = og_get_group_context();
if (isset($group_node->title)) {
   return TRUE;
}

Hope that helps someone else out there.

sun’s picture

Status: Active » Closed (won't fix)

This issue is not really related to og_user_roles. Instead, OG itself should probably enhance those links and apply a group context (gid query parameter).

At least, it's not OGUR's job to do something like that.