--- rss_permissions/rss_permissions.module-orig	2010-02-01 18:08:18.000000000 -0600
+++ rss_permissions/rss_permissions.module	2010-07-22 23:48:44.217258600 -0500
@@ -7,13 +7,54 @@
 function rss_permissions_help($path, $arg) {
   switch ($path) {
     case 'admin/help#rss_permissions':
-      return '<p>' . t('RSS permissions module adds role-based permissions to various RSS feeds on a Drupal site. Go to <a href="@rss_permissions">rss_permissions module</a> section of the Permissions page to set permissions for various feeds per role.', array('@rss_permissions' => url('admin/user/permissions', array('fragment' => 'module-rss_permissions')))) . '</p>'
-          . '<p>' . t('You can manage permissions for main site RSS feed, aggregator RSS feeds (if Aggregator module is enabled), main blog RSS feed and user blog RSS feeds (if Blog module is enabled), and taxonomy RSS feeds (if Taxonomy module is enabled).') . '</p>';
+      return '<p>' .
+          t('RSS permissions module adds role-based permissions to various RSS feeds on a Drupal site. Go to <a href="@rss_permissions">rss_permissions module</a> section of the Permissions page to set permissions for various feeds per role.', array('@rss_permissions' => url('admin/user/permissions', array('fragment' => 'module-rss_permissions')))) .
+        '</p>' .
+        '<p>' . 
+          t('You can manage permissions for main site RSS feed, aggregator RSS feeds (if Aggregator module is enabled), main blog RSS feed and user blog RSS feeds (if Blog module is enabled), and taxonomy RSS feeds (if Taxonomy module is enabled).') .
+        '</p>' .
+        '<p>' .
+          t('You can disable RSS access altogether !here.',array('!here' => l('here','admin/settings/rss_permissions'))) .
+        '</p>';
       break;
   }
 }
 
 /**
+ * Implementation of hook_form().
+ */
+
+function rss_permissions_form() {
+  $form['rss_permissions_disable_altogether'] = array(
+    '#type' => 'select',
+    '#title' => t('Disable RSS access altogether or use role permissions'),
+    '#default_value' => _rss_permissions_disable_altogether_get(),
+    '#options' => array(
+      0 => t('Use permissions'),
+      1 => t('Disable altogether'),
+    ),
+    '#description' => t('Choose an option'),
+  );
+  return system_settings_form($form);
+}
+
+/**
+ * Implementation of hook_menu()
+ */
+function rss_permissions_menu() {
+  $menu['admin/settings/rss_permissions'] = array(
+    'title' => t('RSS permissions'),
+    'page callback' => 'drupal_get_form',
+    'page arguments' => array('rss_permissions_form'),
+    'access arguments' => array('access administration pages'),
+    'type' => MENU_NORMAL_ITEM,
+    'description' => t('Select to use permissions or to disable RSS access altogether.'),
+  );
+
+  return $menu;
+}
+
+/**
  * Implementation of hook_perm().
  */
 function rss_permissions_perm() {
@@ -152,6 +193,10 @@
  */
 function rss_permissions_feed_url_access($url) {
 
+  if (_rss_permissions_disable_altogether_get()) {
+    return FALSE;
+  }
+
   // Site's main RSS feed.
   if (url('rss.xml', array('absolute' => TRUE)) == $url) {
     return user_access('access content') && user_access('access site RSS feed');
@@ -196,3 +241,17 @@
 	}
 }
 
+/**
+ * Return current "disable altogether" setting
+ */
+function _rss_permissions_disable_altogether_get() {
+  return variable_get('rss_permissions_disable_altogether',0)?1:0;
+}
+
+/**
+ * Set "disable altogether" setting
+ */
+function _rss_permissions_disable_altogether_set($disable_altogether) {
+  return variable_set('rss_permissions_disable_altogether',$disable_altogether?1:0);
+}
+
