diff options
author | Joey Hess <joey@gnu.kitenet.net> | 2009-02-26 02:31:13 -0500 |
---|---|---|
committer | Joey Hess <joey@gnu.kitenet.net> | 2009-02-26 02:31:13 -0500 |
commit | b30c1b0c38bc8e6730a76135e6bff695d0f778c2 (patch) | |
tree | 89e1b64d36d83ff1209ed1a4d204d1ad1ecbead8 | |
parent | 158c6c3ac8a8975741587b55a298f10e632e993e (diff) |
comments: Avoid showing comment moderation button in prefs to non-admins.
-rw-r--r-- | IkiWiki/Plugin/comments.pm | 3 | ||||
-rw-r--r-- | debian/changelog | 1 |
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 |