Allowed admins to share room with themselves (#2442)

This commit is contained in:
Ahmad Farhat
2021-01-18 18:34:42 -05:00
committed by GitHub
parent 0e8e188e24
commit 957bf88a85
5 changed files with 6 additions and 4 deletions

View File

@ -74,7 +74,7 @@
</a>
<% end %>
<% if shared_access_allowed %>
<a href="" data-toggle="modal" data-target="#shareRoomModal" class="share-room dropdown-item" data-path="<%= room_shared_access_path(room) %>" data-users-path="<%= room_shared_users_path(room) %>">
<a href="" data-toggle="modal" data-target="#shareRoomModal" class="share-room dropdown-item" data-path="<%= room_shared_access_path(room) %>" data-users-path="<%= room_shared_users_path(room) %>" data-owner="<%= room.owner.uid %>">
<i class="dropdown-icon fas fa-users"></i> <%= t("room.share") %>
</a>
<% end %>

View File

@ -56,7 +56,7 @@
</a>
<% end %>
<% if shared_access_allowed %>
<a href="" data-toggle="modal" data-target="#shareRoomModal" class="share-room dropdown-item" data-path="<%= room_shared_access_path(room) %>" data-users-path="<%= room_shared_users_path(room) %>">
<a href="" data-toggle="modal" data-target="#shareRoomModal" class="share-room dropdown-item" data-path="<%= room_shared_access_path(room) %>" data-users-path="<%= room_shared_users_path(room) %>" data-owner="<%= room.owner.uid %>">
<i class="dropdown-icon fas fa-users"></i> <%= t("room.share") %>
</a>
<% end %>

View File

@ -28,6 +28,7 @@
<ul id="user-list" class="list-group">
</ul>
</div>
<input id="room-owner-uid" type="hidden">
<div class="mt-6">
<button id="save-access" class="btn btn-primary btn-block" onclick="saveAccessChanges()" ><%= t("modal.share_access.save") %></button>
<button class="btn btn-secondary text-primary btn-block" onclick="$('#shareRoomModal').modal('hide')"><%= t("modal.share_access.cancel_changes") %></button>