From 46a1c21388be2e1b2c7eab585a6c23f6aeb3bfc4 Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Sun, 18 Jan 2015 19:21:58 +0100 Subject: [PATCH] Fix setting owner role after authentication --- vroom.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vroom.pl b/vroom.pl index 949eaba..338296c 100755 --- a/vroom.pl +++ b/vroom.pl @@ -1376,9 +1376,9 @@ any '/api' => sub { my $pass = $req->{param}->{'password'}; # Auth succeed ? lets promote him to owner of the room if ($room->{owner_password} && Crypt::SaltedHash->validate($room->{owner_password}, $pass)){ - $self->session($room, {role => 'owner'}); + $self->session($room->{name}, {role => 'owner'}); $self->associate_key_to_room( - room => $room, + room => $room->{name}, key => $self->session('key'), role => 'owner' );