From 72065fb8351b54eee5f1928c18e06ad81aa9b502 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Wed, 20 Jun 2001 20:00:40 +0000 Subject: - Added a brand-new access.module which allows you to manage 'roles' (groups) and 'permissions' ... (inspired by Zope's system). + Once installed, click the help-link for more information. + See updates/2.00-to-x.xx.sql for the SQL updates. - Modified loads of code to use our new access.module. The system still has to mature though: new permissions have to be added and existing permissions need stream-lining. Awaiting suggestions. - As a direct result of the new access system, I had to rewrite the way the top-level links in admin.php are rendered and displayed, and xhtml-ified admin.php while I was at it. TODO - Home-brewed modules need updating, home-brewed themes not. (Examples: file.module, trip_link.module) - As soon we *finished* the refactoring of the user system (KJ has been working on this refactoring already) we should consider to embed this role and permission code into account.module ... --- modules/watchdog.module | 36 +++++++++++++++++++++++------------- 1 file changed, 23 insertions(+), 13 deletions(-) (limited to 'modules/watchdog.module') diff --git a/modules/watchdog.module b/modules/watchdog.module index 02c7c23ca..23d4c8d28 100644 --- a/modules/watchdog.module +++ b/modules/watchdog.module @@ -7,6 +7,10 @@ function watchdog_help() { format_interval(3600), 10800 => format_interval(10800), 21600 => format_interval(21600), 32400 => format_interval(32400), 43200 => format_interval(43200), 86400 => format_interval(86400), 172800 => format_interval(172800), 259200 => format_interval(259200), 604800 => format_interval(604800), 1209600 => format_interval(1209600), 2419200 => format_interval(2419200), 1000000000 => t("Never")); $output .= form_select(t("Discard entries older than"), "watchdog_clear", variable_get("watchdog_clear", 604800), $period, t("The time watchdog entries should be kept. Older entries will be automatically discarded. Requires crontab.")); @@ -53,19 +57,25 @@ function watchdog_view($id) { } function watchdog_admin() { - global $op, $id, $type, $order; - - print "account messages | regular messages | special messages | warning messages | error messages | httpd messages | overview | help
\n"; - - switch ($op) { - case "help": - watchdog_help(); - break; - case "view": - print watchdog_view(check_input($id)); - break; - default: - print watchdog_overview($type); + global $user, $op, $id, $type, $order; + + if (user_access($user, "access watchdog")) { + + print "account messages | regular messages | special messages | warning messages | error messages | httpd messages | overview | help
\n"; + + switch ($op) { + case "help": + watchdog_help(); + break; + case "view": + print watchdog_view(check_input($id)); + break; + default: + print watchdog_overview($type); + } + } + else { + print message_access(); } } -- cgit v1.2.3