summaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin
diff options
context:
space:
mode:
authorJoey Hess <joey@gnu.kitenet.net>2009-02-26 02:31:13 -0500
committerJoey Hess <joey@gnu.kitenet.net>2009-02-26 02:31:13 -0500
commitb30c1b0c38bc8e6730a76135e6bff695d0f778c2 (patch)
tree89e1b64d36d83ff1209ed1a4d204d1ad1ecbead8 /IkiWiki/Plugin
parent158c6c3ac8a8975741587b55a298f10e632e993e (diff)
comments: Avoid showing comment moderation button in prefs to non-admins.
Diffstat (limited to 'IkiWiki/Plugin')
-rw-r--r--IkiWiki/Plugin/comments.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/IkiWiki/Plugin/comments.pm b/IkiWiki/Plugin/comments.pm
index 3cdffe856..ee53dbc91 100644
--- a/IkiWiki/Plugin/comments.pm
+++ b/IkiWiki/Plugin/comments.pm
@@ -605,7 +605,8 @@ sub formbuilder_setup (@) {
my %params=@_;
my $form=$params{form};
- if ($form->title eq "preferences") {
+ if ($form->title eq "preferences" &&
+ IkiWiki::is_admin($params{session}->param("name"))) {
push @{$params{buttons}}, "Comment Moderation";
if ($form->submitted && $form->submitted eq "Comment Moderation") {
commentmoderation($params{cgi}, $params{session});