diff options
Diffstat (limited to 'modules/conf.module')
-rw-r--r-- | modules/conf.module | 46 |
1 files changed, 28 insertions, 18 deletions
diff --git a/modules/conf.module b/modules/conf.module index 4a03a1a99..ba55d82b6 100644 --- a/modules/conf.module +++ b/modules/conf.module @@ -12,6 +12,10 @@ function conf_help() { <?php } +function conf_perm() { + return array("edit configuration options"); +} + function conf_view_options() { global $conf, $cmodes, $corder, $themes; @@ -97,24 +101,30 @@ function conf_view($type) { } function conf_admin() { - global $edit, $op, $type; - - print "<SMALL><A HREF=\"admin.php?mod=conf&type=options\">site settings</A> | <A HREF=\"admin.php?mod=conf&type=filter\">content filters</A> | <A HREF=\"admin.php?mod=conf&op=help\">help</A></SMALL><HR>\n"; - - switch ($op) { - case "help": - conf_help(); - break; - case "Reset to defaults": - print status(conf_default($edit)); - print conf_view($type); - break; - case "Save configuration": - print status(conf_save($edit)); - print conf_view($type); - break; - default: - print conf_view($type); + global $user, $edit, $op, $type; + + if (user_access($user, "edit configuration options")) { + + print "<SMALL><A HREF=\"admin.php?mod=conf&type=options\">site settings</A> | <A HREF=\"admin.php?mod=conf&type=filter\">content filters</A> | <A HREF=\"admin.php?mod=conf&op=help\">help</A></SMALL><HR>\n"; + + switch ($op) { + case "help": + conf_help(); + break; + case "Reset to defaults": + print status(conf_default($edit)); + print conf_view($type); + break; + case "Save configuration": + print status(conf_save($edit)); + print conf_view($type); + break; + default: + print conf_view($type); + } + } + else { + print message_access(); } } |