--- contact.module-old	2006-04-12 18:27:49.949423904 +0100
+++ contact.module	2006-04-12 18:22:32.813635872 +0100
@@ -38,6 +38,13 @@
 }
 
 /**
+ * Implementation of hook_perm().
+ */
+function contact_perm() {
+  return array('user contact form');
+}
+
+/**
  * Implementation of hook_menu().
  */
 function contact_menu($may_cache) {
@@ -98,6 +105,7 @@
       $items[] = array('path' => "user/". arg(1) ."/contact",
         'title' => t('contact'),
         'callback' => 'contact_mail_user',
+        'access' => user_access('user contact form'),
         'type' => MENU_LOCAL_TASK,
         'weight' => 2,
       );
@@ -113,7 +121,7 @@
  * Allows the user the option of enabling/disabling his personal contact form.
  */
 function contact_user($type, $edit, &$user, $category = NULL) {
-  if ($type == 'form' && $category == 'account') {
+  if ($type == 'form' && $category == 'account' && user_access('user contact form')) {
     $form['contact'] = array('#type' => 'fieldset',
       '#title' => t('Contact settings'),
       '#weight' => 5,
