--- taxonomy_html.module.orig	Fri Nov 14 11:15:12 2003
+++ taxonomy_html.module.new	Wed Jan 14 14:37:37 2004
@@ -1,6 +1,7 @@
 <?php
 // $Id: taxonomy_html.module,v 1.23 2003/11/14 17:15:12 killes Exp $
 function taxonomy_html_block($op = "list", $delta = 0) {
+  if (!user_access('view taxonomy html')) { return; }
   if ($op == "list") {
     $vocabularies = taxonomy_get_vocabularies();
     $i = 0;
@@ -109,10 +110,9 @@
   if ($type == "admin" && user_access("administer taxonomy")) {
     $links[] = l(t("taxonomy_html"), "admin/taxonomy_html");
   }
-  if ($type == "page") {
+  if ($type == "page" && user_access('view taxonomy html')) {
     $text = t(variable_get("taxonomy_html_overview_title", "Categories"));
-    $text[0] = strtolower($text[0]);
-    
+    $text = strtolower($text);
     $links[] = l(t($text), "taxonomy_html");
   }
   return $links;
@@ -132,14 +132,18 @@
 
 function taxonomy_html_page() {
   $op = $_POST["op"];
-  
-  // TODO: is access control needed here?  
-  switch ($op) {
-    case "overview":
-    default:
-      print theme("header");
-      print theme("box", t(variable_get("taxonomy_html_overview_title", "Categories")), taxonomy_html_overview());
-      print theme("footer");
+  if (user_access('access taxonomy html')) {
+    switch ($op) {
+      case "overview":
+      default:
+        print theme("header");
+        print theme("box", t(variable_get("taxonomy_html_overview_title", "Categories")), taxonomy_html_overview());
+        print theme("footer");
+    }
+  } else {
+    theme("header", t("Access denied"));
+    theme("box", t("Access denied"), message_access());
+    theme("footer");
   }
 }  
 
@@ -157,4 +161,8 @@
   }
   return $output;
 }  
+
+function taxonomy_html_perm() {
+  return(array('access taxonomy html'));
+}
 ?>
