? .svn
? p_219181_editown.patch
? p_238958_typos.patch
? p_239336_pagebreak.patch
? p_239343_access.patch
? p_239751_throttle.patch
? components/.svn
? po/.svn
Index: webform.install
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/webform/webform.install,v
retrieving revision 1.14.2.16.2.15
diff -u -p -r1.14.2.16.2.15 webform.install
--- webform.install	28 Feb 2008 03:21:40 -0000	1.14.2.16.2.15
+++ webform.install	28 Mar 2008 16:14:18 -0000
@@ -655,6 +655,25 @@ function webform_update_20() {
 }
 
 /**
+ * Look for users with any webform permission and assign them the new 'access webforms'.
+ */
+function webform_update_21() {
+  $ret = array();
+  switch ($GLOBALS['db_type']) {
+    case 'mysqli':
+    case 'mysql':
+    case 'pgsql':
+      $results = db_query("SELECT rid, perm FROM {permission} WHERE perm LIKE '%webform%'");
+      while ($result = db_fetch_object($results)) { // update each relevant role with the new permission.
+        $ret[] = update_sql("UPDATE {permission} SET perm = '". $result->perm .", access webforms' WHERE rid = ". $result->rid);
+        drupal_set_message(t("A new permission, 'access webforms', has been created. An attempt has been made to intelligently upgrade your user roles, but you should manually check your !access_control to ensure proper configuration of webform module access.", array('!access_control' => l(t('access control'), 'admin/user/access'))));
+      }
+      break;
+  }
+  return $ret;
+}
+
+/**
  * Recursively delete all files and folders in the specified filepath, then
  * delete the containing folder.
  *
Index: webform.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/webform/webform.module,v
retrieving revision 1.113.2.70.2.30
diff -u -p -r1.113.2.70.2.30 webform.module
--- webform.module	21 Mar 2008 23:46:54 -0000	1.113.2.70.2.30
+++ webform.module	28 Mar 2008 16:14:19 -0000
@@ -242,7 +242,7 @@ function webform_menu($may_cache) {
  * Implementation of hook_perm().
  */
 function webform_perm() {
-  return array("create webforms", "edit own webforms", "edit webforms", "access webform results", "clear webform results", "access own webform submissions", "edit own webform submissions", "edit webform submissions", "use PHP for additional processing");
+  return array("access webforms", "create webforms", "edit own webforms", "edit webforms", "access webform results", "clear webform results", "access own webform submissions", "edit own webform submissions", "edit webform submissions", "use PHP for additional processing");
 }
 
 /**
@@ -270,6 +270,8 @@ function webform_access($op, $node) {
     case "update":
     case "delete":
       return user_access("edit webforms") || (user_access("edit own webforms") && ($user->uid == $node->uid));
+    case "view":
+      return user_access("access webforms");
   }
 }
 
