Renamed it from "Wiki Setup" to just "Setup" for good measure.
my %params=@_;
my $form=$params{form};
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;
}
showform($params{cgi}, $params{session});
exit;
}
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.)
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
-- Joey Hess <joeyh@debian.org> Sun, 02 May 2010 13:22:50 -0400
>>>> 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.
>>>> 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]]
>>>> problem is not in determining if you're an admin, but elsewhere..
>>>> --[[Joey]]
[[!tag type/web]]
This plugin allows wiki admins to configure the wiki using a web interface,
[[!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
to the admins' preferences page.
Warning: This plugin rewrites your setup file. Any comments or unusual
to banning users and locking pages.
If you log in as the admin user you configured earlier, and go to
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
wiki settings and plugins.
Some settings cannot be configured on the web, for security reasons or