Needs work
Project:
View Unpublished
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
13 Sep 2012 at 21:59 UTC
Updated:
17 Dec 2019 at 21:23 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
cweagansBam.
Comment #2
cweagansFix a notice in the case that og_context is enabled, but user is not currently in a group context.
Comment #3
grndlvl commentedThis causes an infinite loop. See #1781218: Calling og_context() in a menu access callback crashes system
Patch changes to
Comment #4
grndlvl commentedIgnore previous patch contains color ugliness. Here is a clean one.
Comment #5
socialnicheguru commenteddoes this work with og 7.1 or 7.2?
Comment #6
arosboro commentedI just applied it and tested with og-7.x-2.x unpublished nodes are visible to users with new og permissions.
Comment #7
arosboro commentedI spoke too soon. This patch uses og 7.x-1.x version of og_context_determine_context which causes an infinite loop when menu_get_item is called in 7.x-2.x.
Comment #8
arosboro commentedUsing spaces instead of og context gets rid of the infinite loop here.
Comment #9
entendu commentedNo activity in a long time.
Comment #10
jojonaloha commentedAttached patch adds support for OG 7.x-2.x (tested with OG 7.x-2.7).
I took a different approach then the previous patches, because
hook_node_access()doesn't get called for content lists (for example in Views). Since this module already uses thehook_node_grants()andhook_node_access_records()hooks, which do work with content lists, I expanded those to add additional grants if the OG module is enabled.Also, I haven't added an update script to rebuild node access yet, so you will need to do that after applying the patch.
Comment #11
WorldFallz commentedPatch applies cleaning and works as advertised. What do we need to push this forward?
Comment #12
rimu commented#10 works for me too. Thanks jojonaloha!
Comment #13
henrijs.seso commentedThen...
Comment #14
drupalfan2 commentedIs this patch still necessary with latest version for Drupal 7?
Comment #15
WorldFallz commentedIf it's not been committed and the issue closed, then yes.
Comment #16
dalinI think just a copy of
view_unpublished_update_7100()so that the warning pops up about node access needing rebuilt.Comment #17
dalinActually, here's a re-roll. I was seeing SQL errors with duplicate entries when rebuilding permissions. Just needed some keys in our $grants array. Whether this is my data that is faulty, or an actual bug, I don't know.