websetup: Only display Setup button on admins' preferences page.

Renamed it from "Wiki Setup" to just "Setup" for good measure.
master
Joey Hess 2010-05-03 13:59:43 -04:00
parent 0fc32c8b2f
commit 9699f16b51
5 changed files with 8 additions and 6 deletions

View File

@ -503,9 +503,10 @@ sub formbuilder_setup (@) {
my %params=@_;
my $form=$params{form};
if ($form->title eq "preferences") {
push @{$params{buttons}}, "Wiki Setup";
if ($form->submitted && $form->submitted eq "Wiki Setup") {
if ($form->title eq "preferences" &&
IkiWiki::is_admin($params{session}->param("name"))) {
push @{$params{buttons}}, "Setup";
if ($form->submitted && $form->submitted eq "Setup") {
showform($params{cgi}, $params{session});
exit;
}

1
debian/changelog vendored
View File

@ -10,6 +10,7 @@ ikiwiki (3.20100502) UNRELEASED; urgency=low
links to the action bar without modifying the template further.
(COMMENTSLINK and DISCUSSIONLINK could be folded into this, but
are kept separate for now to avoid breaking modified templates.)
* websetup: Only display Setup button on admins' preferences page.
-- Joey Hess <joeyh@debian.org> Sun, 02 May 2010 13:22:50 -0400

View File

@ -62,7 +62,7 @@ index 0bf100a..77b467a 100644
>>>> So you can see if the two usernames/openids match. If the end is "0",
>>>> they don't match. If nothing is logged, you have not enabled the websetup plugin.
>>>> If the end if "1" you should see the "Wiki Setup" button, if not the
>>>> If the end if "1" you should see the "Setup" button, if not the
>>>> problem is not in determining if you're an admin, but elsewhere..
>>>> --[[Joey]]

View File

@ -2,7 +2,7 @@
[[!tag type/web]]
This plugin allows wiki admins to configure the wiki using a web interface,
rather than editing the setup file directly. A "Wiki Setup" button is added
rather than editing the setup file directly. A "Setup" button is added
to the admins' preferences page.
Warning: This plugin rewrites your setup file. Any comments or unusual

View File

@ -89,7 +89,7 @@ These range from changing the wiki's name, to enabling [[plugins]],
to banning users and locking pages.
If you log in as the admin user you configured earlier, and go to
your Preferences page, you can click on "Wiki Setup" to customize many
your Preferences page, you can click on "Setup" to customize many
wiki settings and plugins.
Some settings cannot be configured on the web, for security reasons or