Make invite menu owner reserved

Simple participants should have access to this
master
Daniel Berteaud 11 years ago
parent c6945486d1
commit 4f79e4b156
  1. 5
      public/vroom.pl
  2. 70
      templates/default/join.html.ep

@ -656,7 +656,10 @@ post '/action' => sub {
my $message = $self->param('message'); my $message = $self->param('message');
my $status = 'error'; my $status = 'error';
my $msg = $self->l('ERROR_OCCURED'); my $msg = $self->l('ERROR_OCCURED');
if ($rcpt !~ m/\S+@\S+\.\S+$/){ if (!$self->session($room) || $self->session($room)->{role} ne 'owner'){
$msg = 'NOT_ALLOWED';
}
elsif ($rcpt !~ m/\S+@\S+\.\S+$/){
$msg = $self->l('ERROR_MAIL_INVALID'); $msg = $self->l('ERROR_MAIL_INVALID');
} }
elsif ($self->email( elsif ($self->email(

@ -12,8 +12,42 @@
</div> </div>
<input id="roomName" name="roomName" type="hidden" value="<%= $room %>"/> <input id="roomName" name="roomName" type="hidden" value="<%= $room %>"/>
<div id="roomToolBar" class="collapse navbar-collapse"> <div id="roomToolBar" class="collapse navbar-collapse">
<div class="navbar-form navbar-left input-group">
<div class="input-group">
<input type="text" id="displayName" class="form-control help" placeholder="<%=l 'YOUR_NAME' %>" data-toggle="tooltip" data-placement="bottom" title="<%=l 'NAME_SENT_TO_OTHERS' %>"/>
<span class="input-group-btn">
<button id="changeColorButton" class="btn btn-default help" data-toggle="tooltip" data-placement="bottom" title="<%=l 'CHANGE_COLOR' %>">
<span class="glyphicon glyphicon-tag">
</span>
</button>
</span>
</div>
</div>
<div class="btn-group navbar-form navbar-left">
<button id="chatDropdown" class="form-control collapsed help" data-toggle="collapse" data-target="#chatMenu" data-toggle="tooltip" data-placement="bottom" title="<%=l 'CLICK_TO_CHAT' %>">
<span class="glyphicon glyphicon-comment">
</span>
</button>
</div>
<div class="btn-group navbar-form navbar-left" data-toggle="buttons">
<label class="btn btn-default help" id="muteMicLabel" data-toggle="tooltip" data-placement="bottom" title="<%=l 'MUTE_MIC' %>">
<input type="checkbox" id="muteMicButton">
<span class="glyphicon glyphicon-volume-off">
</span>
</label>
<label class="btn btn-default help" id="suspendCamLabel" data-toggle="tooltip" data-placement="bottom" title="<%=l 'SUSPEND_CAM' %>">
<input type="checkbox" id="suspendCamButton">
<span class="glyphicon glyphicon-eye-close">
</span>
</label>
<label class="btn btn-default help" id="shareScreenLabel" data-toggle="tooltip" data-placement="bottom" title="<%=l 'SHARE_YOUR_SCREEN' %>">
<input type="checkbox" id="shareScreenButton">
<span class="glyphicon glyphicon-expand">
</span>
</label>
</div>
<div id="inviteDropdownContainer" class="navbar-form navbar-left input-group"> <div id="inviteDropdownContainer" class="navbar-form navbar-left input-group">
<button class="btn btn-default dropdown-toggle help" type="button" id="inviteMenuButton" data-toggle="dropdown" data-toggle="tooltip" data-placement="bottom" title="<%=l 'INVITE_PEOPLE' %>"> <button class="btn btn-default dropdown-toggle help ownerEl" type="button" id="inviteMenuButton" data-toggle="dropdown" data-toggle="tooltip" data-placement="bottom" title="<%=l 'INVITE_PEOPLE' %>">
<span class="glyphicon glyphicon-user"></span> <span class="glyphicon glyphicon-user"></span>
<span class="caret"></span> <span class="caret"></span>
</button> </button>
@ -53,40 +87,6 @@
</li> </li>
</ul> </ul>
</div> </div>
<div class="navbar-form navbar-left input-group">
<div class="input-group">
<input type="text" id="displayName" class="form-control help" placeholder="<%=l 'YOUR_NAME' %>" data-toggle="tooltip" data-placement="bottom" title="<%=l 'NAME_SENT_TO_OTHERS' %>"/>
<span class="input-group-btn">
<button id="changeColorButton" class="btn btn-default help" data-toggle="tooltip" data-placement="bottom" title="<%=l 'CHANGE_COLOR' %>">
<span class="glyphicon glyphicon-tag">
</span>
</button>
</span>
</div>
</div>
<div class="btn-group navbar-form navbar-left">
<button id="chatDropdown" class="form-control collapsed help" data-toggle="collapse" data-target="#chatMenu" data-toggle="tooltip" data-placement="bottom" title="<%=l 'CLICK_TO_CHAT' %>">
<span class="glyphicon glyphicon-comment">
</span>
</button>
</div>
<div class="btn-group navbar-form navbar-left" data-toggle="buttons">
<label class="btn btn-default help" id="muteMicLabel" data-toggle="tooltip" data-placement="bottom" title="<%=l 'MUTE_MIC' %>">
<input type="checkbox" id="muteMicButton">
<span class="glyphicon glyphicon-volume-off">
</span>
</label>
<label class="btn btn-default help" id="suspendCamLabel" data-toggle="tooltip" data-placement="bottom" title="<%=l 'SUSPEND_CAM' %>">
<input type="checkbox" id="suspendCamButton">
<span class="glyphicon glyphicon-eye-close">
</span>
</label>
<label class="btn btn-default help" id="shareScreenLabel" data-toggle="tooltip" data-placement="bottom" title="<%=l 'SHARE_YOUR_SCREEN' %>">
<input type="checkbox" id="shareScreenButton">
<span class="glyphicon glyphicon-expand">
</span>
</label>
</div>
<div class="btn-group navbar-form navbar-left"> <div class="btn-group navbar-form navbar-left">
<button class="btn btn-default dropdown-toggle help ownerEl" type="button" id="confMenuButton" data-toggle="dropdown" data-toggle="tooltip" data-placement="bottom" title="<%=l 'CONFIGURE' %>"> <button class="btn btn-default dropdown-toggle help ownerEl" type="button" id="confMenuButton" data-toggle="dropdown" data-toggle="tooltip" data-placement="bottom" title="<%=l 'CONFIGURE' %>">
<span class="glyphicon glyphicon-wrench"></span> <span class="glyphicon glyphicon-wrench"></span>

Loading…
Cancel
Save