Closed (fixed)
Project:
Node Gallery
Version:
6.x-3.0
Component:
Howto/FAQ/Example
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
5 Oct 2011 at 04:34 UTC
Updated:
4 Jan 2014 at 01:11 UTC
Jump to comment: Most recent
Comments
Comment #1
foredoc commented1) I checked {og_access_post}, and found that:
when nid = 2, og_access_post.og_public = 0; (gallery is non-public)
when nid = 3, og_access_post.og_public = 1; (gallery image is public)
2) I checked: function node_gallery_inherit_group_settings(&$image), and found that:
$gallery_node = node_load($image->gid) does NOT load og_public correctly,
when og_public = 1, $gallery_node->og_public = 1;
when og_public = 0, $gallery_node->og_public = NULL;
3) I manually set $gallery_node->og_public = 0, and $image->og_public = 0, and
after uploading the image, the og_public = 1 for image node
Comment #2
foredoc commented4)
gallery image insert flow: og_access_nodeapi->node_gallery_nodeapi(node_gallery_inherit_group_settings)
The problem is:
og_access-nodeapi saves information for gallery_image in {og_access_post} before it inherits the gallery group settings
Solution:
in {system}, adjust the weights of og_access and node_gallery: weight( og_access ) > weight(node_gallery), so that, node_gallery_nodeapi will be called before og_access_nodeapi
Comment #3
foredoc commentedsolution in #2 ensures proper og_public value for gallery_image,
however, the problem: "non-group-member be able to access NON-PUBLIC gallery image within the group" still exists.
Need to check on this.
Comment #4
foredoc commentedMade a mistake in #3, forgot to update previous gallery_image.
Comment #5
dddave commented"Needs review" implies a patch that can be reviewed. ;)
Also adding a tag to make it easier to get all OG issues.
Comment #6
foredoc commentedThanks.
Does this require a patch or just some documentation?
There was another issue related to the weights of Organic groups module, and node gallery module, and the decision was made as following:
http://drupal.org/node/1225140#comment-4772406
Comment #7
dddave commentedWhat is the exact issue here? If I understand the problem correctly (it seems your OP contains a faulty node/3) your solution in #2 fixes the issue.
Is the problem in #3 an independent issue?
Comment #8
foredoc commented#3 is not an issue, it is my mistake.
The issue is the og_public field in {og_access_post} only can be correctly inherited by gallery_image from gallery, if weight( og_access ) > weight(node_gallery)
And the fix is described in #2
Sorry for the confusion
Comment #9
dddave commentedI am setting this to fixed. I don't think that we should patch this into NG core. For those needing this there is an easy workaround documented in #2. Correct?
Comment #10
foredoc commentedYes