From a71a69aca4cd73108d5e58ca8ed7f471893dd798 Mon Sep 17 00:00:00 2001 From: Oliver Gorwits Date: Sun, 2 Feb 2014 18:00:18 +0000 Subject: [PATCH] Try to help users more easily get a default login --- Netdisco/Changes | 1 + Netdisco/bin/netdisco-deploy | 14 +++++++++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/Netdisco/Changes b/Netdisco/Changes index d631908d..92893843 100644 --- a/Netdisco/Changes +++ b/Netdisco/Changes @@ -9,6 +9,7 @@ * [#69] Add search by layers to device search * [#77] Log user access + * Try to help users more easily get a default login [BUG FIXES] diff --git a/Netdisco/bin/netdisco-deploy b/Netdisco/bin/netdisco-deploy index 3ef616c7..96e4105b 100755 --- a/Netdisco/bin/netdisco-deploy +++ b/Netdisco/bin/netdisco-deploy @@ -100,10 +100,10 @@ $bool = $term->ask_yn( deploy_db() if $bool; my $users = schema('netdisco')->resultset('User'); -if ($users->count == 0 and setting('no_auth')) { +if ($users->count == 0) { say ''; $bool = $term->ask_yn( - prompt => 'Would you like the default web user to have Admin rights (discover, etc)?', + prompt => 'Would you like a default web user with Admin rights (discover, etc)?', default => 'n', ); @@ -113,11 +113,15 @@ if ($users->count == 0 and setting('no_auth')) { admin => 'true', port_control => 'true', }); + if (not setting('no_auth')) { + say ''; + say '*** Done. Please add "no_auth: true" to your ~/environments/deployment.yml file. ***'; + } } else { say ''; $bool = $term->ask_yn( - prompt => 'Would you like the default web user to have Port Control rights?', + prompt => 'Would you like a default web user with Port Control rights?', default => 'n', ); if ($bool) { @@ -125,6 +129,10 @@ if ($users->count == 0 and setting('no_auth')) { username => 'guest', port_control => 'true', }); + if (not setting('no_auth')) { + say ''; + say '*** Done. Please add "no_auth: true" to your ~/environments/deployment.yml file. ***'; + } } } }