--- C:\home\feral\www\comments_page\comments_page.module.old 2007-10-28 03:37:57.000000000 -0800 +++ C:\home\feral\www\comments_page\comments_page.module.new 2008-02-19 04:16:16.000000000 -0800 @@ -10,30 +10,38 @@ if (!$may_cache) { $items[] = array( 'path' => 'comments', 'title' => t('Comments'), 'callback' => 'comments_page', - 'access' => TRUE, + 'access' => user_access('access comments'), // [Feral:050/08@04:15] Only users whom can access comments should be able to access this. 'type' => MENU_SUGGESTED_ITEM ); $items[] = array( 'path' => 'comments/'. $user->uid, 'title' => t('Users comments'), - 'access' => TRUE, + 'access' => user_access('access comments'), // [Feral:050/08@04:15] Only users whom can access comments should be able to access this. 'type' => MENU_DYNAMIC_ITEM ); } return $items; } /** * Menu callback; displays a Drupal page containing recent comments. */ function comments_page($a = NULL, $b = NULL) { + // -[Feral]------------------------------------------------------------ + // Only users whom can access comments should be able to access this. + if (!user_access('access comments') ) + { + return drupal_access_denied(); + } + // -------------------------------------------------------------------- + if (is_numeric($a)) { // $a is a user ID return comments_page_user($a); } else { return comments_page_last(); }