GRN2-253: Added the ability to share rooms across multiple users (#912)

* Added ability to share rooms with other users

* Fixed testcases
This commit is contained in:
Ahmad Farhat
2020-01-23 09:04:41 -05:00
committed by farhatahmad
parent 8cbfc3f730
commit 967130e57c
36 changed files with 748 additions and 55 deletions

View File

@ -153,6 +153,9 @@ module Greenlight
# Default limit on number of rooms users can create
config.number_of_rooms_default = 15
# Allow users to share rooms by default
config.shared_access_default = (ENV["SHARED_ACCESS"] == "true").to_s
# Default admin password
config.admin_password_default = ENV['ADMIN_PASSWORD'] || 'administrator'

View File

@ -70,6 +70,9 @@ en:
rooms:
info: Limits the number of rooms that a user can have (including Home Room). This setting does not apply to administrators.
title: Number of Rooms per User
shared_access:
info: Setting to disabled will remove the button from the Room options dropdown, preventing users from sharing rooms
title: Allow Users to Share Rooms
subtitle: Customize Greenlight
title: Site Settings
flash:
@ -342,6 +345,10 @@ en:
with: Sign in with %{provider}
forgot_password: Forgot Password?
rename_recording:
remove_shared:
title: Are you sure you want to remove this room from your room list?
delete: I'm sure, remove this room.
warning: You will <b>not</b> be able to access this room anymore.
room_settings:
title: Room Settings
update: Update Room
@ -353,6 +360,13 @@ en:
footer_text: Adjustment to your room can be done at anytime.
rename_room:
name_placeholder: Enter a new room name...
share_access:
footer: Sharing a room with a user allows them to start the room and view the room's recordings
list: Shared With
title: Share Room Access
save: Save Changes
cancel_changes: Cancel Changes
select: Select User
name_update_success: Room name successfully changed!
no_user_email_exists: There is no existing user with the email specified. Please make sure you typed it correctly.
omniauth_error: An error occured while authenticating with omniauth. Please try again or contact an administrator!
@ -413,6 +427,7 @@ en:
invite:
fail: Your token is either invalid or has expired. If you believe this is a mistake, please contact your administrator.
no_invite: You do not have an invitation to join. Please contact your administrator to receive one.
remove: Remove
rename: Rename
reset_password:
subtitle: Reset Password
@ -460,6 +475,12 @@ en:
room_limit_exceeded: You have exceeded the number of rooms allowed. Please delete %{difference} room(s) to access this room.
sessions: Sessions
settings: Room Settings
share: Manage Access
shared_by: Shared by %{email}
remove_shared_access_success: Successfully removed shared room from your room list
remove_shared_access_error: There was an error removing the shared room from your list
shared_access_success: Room shared successfully
shared_access_error: There was an error sharing the room
start: Start
unavailable: This room is currently unavailable due to the owner's email not being verified.
update_settings_error: There was an error updating the room settings

View File

@ -112,6 +112,9 @@ Rails.application.routes.draw do
post '/', to: 'rooms#join'
patch '/', to: 'rooms#update', as: :update_room
post '/update_settings', to: 'rooms#update_settings'
post '/update_shared_access', to: 'rooms#shared_access', as: :room_shared_access
delete '/remove_shared_access', to: 'rooms#remove_shared_access', as: :room_remove_shared_access
get '/shared_users', to: 'rooms#shared_users', as: :room_shared_users
post '/start', to: 'rooms#start', as: :start_room
get '/logout', to: 'rooms#logout', as: :logout_room
post '/login', to: 'rooms#login', as: :login_room