Commit d6e3b234 authored by greggles's avatar greggles

feature #192325 by greggles: provide a permission for comment notify usage

parent 7c7da0af
......@@ -52,7 +52,8 @@ function comment_notify_help($section) {
function comment_notify_form_alter($form_id, &$form) {
global $user;
if ($form_id != 'comment_form') {
// Only do alter the form if it's a comment form and the user has the permission to subscribe
if ($form_id != 'comment_form' || !user_access('Subscribe to comments')) {
return;
}
......@@ -118,7 +119,7 @@ function comment_notify_form_alter($form_id, &$form) {
* Implementation of hook_perm
*/
function comment_notify_perm() {
return array('Administer comment notify');
return array('Administer comment notify', 'Subscribe to comments');
}
/**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment