summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--IkiWiki/Plugin/comments.pm3
-rw-r--r--debian/changelog1
2 files changed, 3 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});
diff --git a/debian/changelog b/debian/changelog
index ac7e2f21d..68d08ad8e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -11,6 +11,7 @@ ikiwiki (3.05) UNRELEASED; urgency=low
* Updated German translation (Kai Wasserbäch). Closes: #516770
* Setup automator: Prompt for password twice. Closes: #516973
* bzr: Add missing stub rcs_diff.
+ * comments: Avoid showing comment moderation button in prefs to non-admins.
-- Joey Hess <joeyh@debian.org> Sun, 15 Feb 2009 20:11:57 -0500