comments: Avoid showing comment moderation button in prefs to non-admins.

master
Joey Hess 2009-02-26 02:31:13 -05:00
parent 158c6c3ac8
commit b30c1b0c38
2 changed files with 3 additions and 1 deletions

View File

@ -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});

1
debian/changelog vendored
View File

@ -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