allow adminuser to be an email address

master
Joey Hess 2015-05-13 23:07:29 -04:00
parent 239cd95db7
commit 22339188e7
2 changed files with 27 additions and 25 deletions

View File

@ -154,6 +154,7 @@ sub import (@) {
foreach my $admin (@{$config{adminuser}}) {
next if defined IkiWiki::openiduser($admin);
if (! defined IkiWiki::emailuser($admin)) {
# Prompt for password w/o echo.
my ($password, $password2);
system('stty -echo 2>/dev/null');
@ -181,6 +182,7 @@ sub import (@) {
error("problem setting up $admin user");
}
}
}
# Add wrappers, make live.
if (system("ikiwiki", "--wrappers", "--setup", $config{dumpsetup}) != 0) {

View File

@ -18,7 +18,7 @@ our $wikiname_short=IkiWiki::Setup::Automator::sanitize_wikiname($wikiname);
our $rcs=IkiWiki::Setup::Automator::ask(
gettext("What revision control system to use?"), "git");
our $admin=IkiWiki::Setup::Automator::ask(
gettext("Which user (wiki account or openid) will be admin?"), $ENV{USER});
gettext("Which user (wiki account, openid, or email) will be admin?"), $ENV{USER});
use Net::Domain q{hostfqdn};
our $domain=hostfqdn() || IkiWiki::Setup::Automator::ask(
gettext("What is the domain name of the web server?"), "");