The patch in issue 2894728 broke the view any unpublished group permission because it passes the node ID of the node being viewed to og_user_access() but og_user_access takes an argument of the GROUP node id.

Updated patch attached that gets the groups of the node being viewed and passes them to og_user_access()

CommentFileSizeAuthor
#2 view_any_unpublished-2901558-2.patch898 bytesjastraat
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jastraat created an issue. See original summary.

jastraat’s picture

Status: Active » Needs review
FileSize
898 bytes
jastraat’s picture

@joelpittet - given that the current dev version has broken some key functionality, I hope you will review this soon.

joelpittet’s picture

Issue tags: +Needs tests

Thanks, could you provide the simplest steps to reproduce the bug, so we can create an automated test together?

jastraat’s picture

Create a piece of unpublished content in a group. (not the group itself; it has to be group content)
Create a group level user in that same group and give them the 'view any unpublished [whatever content type you used in the first step]' permission.
Check that the group level user cannot see the unpublished node. (They should be able to.)

jastraat’s picture

@joelpittet

This was a bug introduced by the patch in 2894728 which had no tests associated with it. Given that this actually removes a key piece of functionality from the module, it seems that at a minimum, you should revert the patch from that earlier ticket.

jastraat’s picture

Priority: Normal » Major

Increasing priority since the current dev version broke a key part of the module's functionality.

  • shenzhuxi committed d1cc063 on 7.x-2.x authored by jastraat
    Issue #2901558 by jastraat: View any unpublished group permissions no...
shenzhuxi’s picture

Status: Needs review » Fixed

Committed. Thanks.

Status: Fixed » Closed (fixed)

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