Active
Project:
Comment Permissions
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
20 Mar 2010 at 00:28 UTC
Updated:
1 Jul 2012 at 16:42 UTC
As part of work for one of my clients, I've created a module that allows you to select users that are allowed to comment on a specific node.
The new module adds a new tab on the node page.
It depends on a small patch to comment_perm. I'm requesting that this be included into comment_perm.
diff -wBNru comment_perm/comment_perm.module modules/comment_perm/comment_perm.module
--- comment_perm-orig/comment_perm.module 2009-11-10 17:16:40.000000000 -0500
+++ comment_perm-new/comment_perm.module 2010-03-19 02:18:11.000000000 -0400
@@ -178,6 +178,13 @@
return TRUE;
}
+ $results = module_invoke_all('comment_perm_access', array('node' => $node, 'account' => $user));
+ foreach($results as $result) {
+ if ($result === TRUE) {
+ return TRUE;
+ }
+ }
+
// comment_perm controlled node types default to no permissions
return FALSE;
}
Comments
Comment #1
pluess commentedI might be interested in your custom module to integrate parts of it. Could you post your custom module?
Comment #2
fizk commentedSorry, I don't have access to that module anymore.
Comment #3
pluess commentedBad luck. So I'm closing this for now.
Comment #4
fizk commentedThis issue isn't about the module I wrote, but about adding the following patch to comment_perm: