From 693d2b2a0116c745ac984fdce66427fd64a1f18d Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Mon, 19 May 2014 11:10:12 +0200 Subject: [PATCH] Only suggest to auth as owner if an owner password is set --- public/vroom.pl | 3 ++- templates/default/error.html.ep | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/public/vroom.pl b/public/vroom.pl index 3e0072d..4d09a01 100755 --- a/public/vroom.pl +++ b/public/vroom.pl @@ -539,7 +539,8 @@ get '/(*room)' => sub { return $self->render('error', msg => sprintf($self->l("ERROR_ROOM_s_LOCKED"), $room), err => 'ERROR_ROOM_s_LOCKED', - room => $room + room => $room, + ownerPass => ($data->{owner_password}) ? '1':'0' ); } # Now, if the room is password protected and we're not a participant, nor the owner, lets prompt for the password diff --git a/templates/default/error.html.ep b/templates/default/error.html.ep index 1fc587f..ab78f0b 100644 --- a/templates/default/error.html.ep +++ b/templates/default/error.html.ep @@ -11,7 +11,7 @@ <%=l 'JOIN_THIS_ROOM' %> <% } elsif ($err eq 'WRONG_PASSWORD'){ %> <%=l 'TRY_AGAIN' %> - <% } elsif ($err eq 'ERROR_ROOM_s_LOCKED'){ %> + <% } elsif ($err eq 'ERROR_ROOM_s_LOCKED' && $ownerPass){ %> <%=l 'AUTH_IF_OWNER' %> <% } %>