Active
Project:
OG Mailhandler
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
24 Sep 2009 at 03:37 UTC
Updated:
25 Sep 2009 at 06:03 UTC
Jump to comment: Most recent file
OG allows node types to be optionally assigned to an OG. EG a "page" node may exist in an OG or independently of one.
The current nodeapi implementation will reject nodes created via the web if:
* The node type is one which MAY be an OG post node type, and
* The node is not assigned to a specific OG.
Comments
Comment #1
xurizaemonIGNORE THIS PATCH :)
Comment #2
xurizaemonThis adds a check to the hook_nodeapi() checks which ensures the logic is only applied when the node is created via the batch or cron methods. However, this isn't a perfect fix, for a number of reasons:
1. A legitimate node may be getting created via batch API but not via Mailhandler, eg node_import. So checking for batch or cron is not the correct method to identify whether the node should have OG restrictions applied. I need to inspect how OG does these checks when validating a node.
2. Mailhandler configuration permits one mailbox to create OG posts and another to create non-OG posts. So checking to see if this node creation is triggered by mailhandler isn't really relevant at all - except mailhandler offers one way of creating nodes in Organic Groups.
It would be good if OG exposed a method to check if user $uid may create a node (of type $type) in OG $gid. (Maybe it does?)
Comment #3
xurizaemonok, this makes more sense, even if it does have to use form_set_error to prevent the node being saved ...
Patch against current CVS attached.
Comment #4
xurizaemonupdated patch - applied to 6.x-1.x