Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
#1 | show-join-link-to-admin-user-2037393-1.patch | 2.05 KB | Devin Carlson |
Comments
Comment #1
Devin Carlson CreditAttribution: Devin Carlson commentedcommons_groups_field_formatter_view()
usesog_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.
Comment #2
japerryLooks good to me!
Comment #3
Devin Carlson CreditAttribution: Devin Carlson commentedCommitted #1 to Commons Groups 7.x-3.x.
http://drupalcode.org/project/commons_groups.git/commit/771a331