[#279] Web sessions use cookies instead of files on disk (M. Johnson)

This commit is contained in:
Oliver Gorwits
2016-10-01 16:27:48 +01:00
parent a6839a5850
commit 0cc7e029f3
8 changed files with 25 additions and 7 deletions

View File

@@ -125,6 +125,7 @@ sub _make_password {
}
}
# set up initial admin user
my $users = schema('netdisco')->resultset('User');
if ($users->search({-bool => 'admin'})->count == 0) {
say '';
@@ -149,6 +150,12 @@ if ($users->search({-bool => 'admin'})->count == 0) {
print color 'reset';
}
# set initial dancer web session cookie key
schema('netdisco')->resultset('Session')->find_or_create(
{id => 'dancer_session_cookie_key', a_session => \'md5(random()::text)'},
{key => 'primary'},
);
say '';
$bool = $term->ask_yn(
prompt => 'Download and update vendor MAC prefixes (OUI data)?', default => 'n',