Only suggest to auth as owner if an owner password is set

master
Daniel Berteaud 11 years ago
parent 479540c3ac
commit 693d2b2a01
  1. 3
      public/vroom.pl
  2. 2
      templates/default/error.html.ep

@ -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

@ -11,7 +11,7 @@
<a class="btn btn-default btn-lg" role="button" href="<%= $self->get_url('/') . $room %>"><%=l 'JOIN_THIS_ROOM' %></a>
<% } elsif ($err eq 'WRONG_PASSWORD'){ %>
<a class="btn btn-default btn-lg" role="button" href="<%= $self->get_url('/password') . '/' . $room %>"><%=l 'TRY_AGAIN' %></a>
<% } elsif ($err eq 'ERROR_ROOM_s_LOCKED'){ %>
<% } elsif ($err eq 'ERROR_ROOM_s_LOCKED' && $ownerPass){ %>
<a class="btn btn-default btn-lg" role="button" href="<%= $self->get_url('/password') . '/' . $room %>"><%=l 'AUTH_IF_OWNER' %></a>
<% } %>
</div>

Loading…
Cancel
Save