When a site admin goes to a group homepage, the "'this node'" content" view/block should include a join/leave group link (as it does for non-admin site users). But the view omits that link and skips straight to the group description, thumbs-up, share this, and following buttons.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Devin Carlson’s picture

Assigned: Unassigned » Devin Carlson
Status: Active » Needs review
FileSize
2.05 KB

commons_groups_field_formatter_view() uses og_user_access() to check if a user does not have appropriate access to a group and display the "Join" link accordingly. The issue stems from the fact that, like most access functions, og_user_access() will always return true for user 1.

The attached patch swaps the access checks for checking group properties and user relationships.

japerry’s picture

Status: Needs review » Reviewed & tested by the community

Looks good to me!

Devin Carlson’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.