From d3ba13b52eab44c80c6b99a8a2f443481599b8d6 Mon Sep 17 00:00:00 2001
From: Dan Chadwick <dan899@gmail.com>
Date: Fri, 29 Aug 2014 09:32:47 -0400
Subject: [PATCH] Issue #2031937 by DanChadwick: Fixed Document
 hook_webform_results_clear_access() in webform.api.php.

---
 webform.api.php |   20 ++++++++++++++++++++
 1 files changed, 20 insertions(+), 0 deletions(-)

diff --git a/webform.api.php b/webform.api.php
index 8be44bd..3e92b74 100644
--- a/webform.api.php
+++ b/webform.api.php
@@ -662,6 +662,26 @@ function hook_webform_results_access($node, $account) {
 }
 
 /**
+ * Determine if a user has access to clear the results of a webform.
+ *
+ * Access via this hook is in addition (adds permission) to the standard
+ * webform access (delete all webform submissions).
+ *
+ * @see webform_results_clear_access().
+ *
+ * @param $node object
+ *   The Webform node to check access on.
+ * @param $account object
+ *   The user account to check access on.
+ * @return boolean
+ *   TRUE or FALSE if the user can access the webform results.
+ */
+function hook_webform_results_clear_access($node, $account) {
+  return user_access('my additional access', $account);
+}
+
+
+/**
  * Return an array of files associated with the component.
  *
  * The output of this function will be used to attach files to e-mail messages.
-- 
1.7.8.msysgit.0

