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.
Just wondering if anyone can provide a quick pointer on this.
We have OG, Mail2Web, Notifications and MailHandler playing happily together in many respects (latest versions plus patch from here http://drupal.org/node/136606#comment-1860524) but testing has shown that a post by a non-group-member to an email address that is set up via Mailhandler is being posted in to a Group that they are not a member of.
Not clear if this is a an oversight in our permissions/settings or if we don't have the Default Commands in Mailhandler quite right.
type: og_post
og_groups: [1]
og_public: 0
status: 1
Comments
Comment #1
xurizaemonMailhandler passes the node to hook_nodeapi() which is where OG would have the opportunity to reject the post.
Because OG normally accepts posts via the forms API, OG depends on that to restrict the list of available groups that a user can post in. (extract below from D6-2.0 og.module)
Here's a quick hook_nodeapi() addition which seems to apply this check for us, although I'm sure it can be a lot more beautiful.
If OG depends on FAPI to control access to OG posts, and MailHandler circumvents those FAPI checks, then hopefully one or the other module will be able to implement something like this to handle the bridging of MailHandler <=> OG.
I'm happy to provide a patch to OG, if given indication that including code like the above in OG is desirable to the maintainers.
Alternatively, perhaps we can create a little Make OG & Mailhandler Play Nicely module to incorporate some of these needs?
Comment #2
petednz CreditAttribution: petednz commentedComment #3
moshe weitzman CreditAttribution: moshe weitzman commentedHmmm. I have long standing gripe with node validation being tied to form api. This is a good example of the problems that ensue.
The code could be even uglier than that. Do we allow admins to email in posts affiliated with unsubscribed groups? The audience selection widget is really complicated. Or, consider the case where a long time group member leaves the group. His posts can no longer be edited by group members (assume wiki content type).
I think this could eventually go into og module itself, but for the moment I'd like to see the code developed in a contrib module and mature there. Let me know if I can help. Feel free to discuss here.
Comment #4
xurizaemonThanks for your offer Moshe. Have done as you requested (I hope!)
See http://drupal.org/project/og_mailhandler
Currently the module contains two pieces of additional code for OG / Mailhandler interoperability: the code above, and the code from http://drupal.org/node/136606#comment-1860524 as well.
Comment #5
Grayside CreditAttribution: Grayside commentedThis issue is over a year old without followup. Marking as Cannot Reproduce and clearing the books. If this remains a genuine issue, please reopen and provide the necessary information.