There is only one perm, now : administer comments on ALL nodes, whoever created the node, and whatever is the content-type of that node. I need more granularity in access control for a specific application.
From another forum thread, I gather that some serious comment.module hacking is in order for this... ?
Trouble is how do I know from the comment itself, say $comment passed as argument to a function, who is the author of the node that comment is attached to, in php, insde comment.module ? Not the author of the comment, but the author of the node the comment is attached to ?
So far here's what I did :
In my custom type module, short_story.module, I added a perm : 'administer comments of own short stories'.
And I am checking this for registered users.
In comment.module, I modified the function comment_form_alter to add the comment settings at the bottom of the page in edit mode :
<?php function comment_form_alter($form_id, &$form) {
if (isset($form['type'])) {
if ($form['type']['#value'] .'_node_settings' == $form_id) {