function commentaccess_permission in Comment Access 7
Implementation of hook_permission().
Return value
array $perms
File
- ./commentaccess.module, line 54 
- Provides users with permissions for comments on nodes they own.
Code
function commentaccess_permission() {
  $perms = array();
  foreach (node_type_get_types() as $node) {
    $type = check_plain($node->type);
    $perms += array(
      "administer comments on own {$type}" => array(
        'title' => t('%type: Administer comments on own content', array(
          '%type' => $node->name,
        )),
      ),
    );
    $perms += array(
      "approve comments on own {$type}" => array(
        'title' => t('%type: Approve comments on own content', array(
          '%type' => $node->name,
        )),
      ),
    );
    $perms += array(
      "delete comments on own {$type}" => array(
        'title' => t('%type: Delete comments on own content', array(
          '%type' => $node->name,
        )),
      ),
    );
  }
  return $perms;
}