Skip to content

Commit

Permalink
LTI-322: Implement guestPolicy on create (#292)
Browse files Browse the repository at this point in the history
* LTI-322: Implement guestPolicy on create

* LTI-322: fixed rubocop error

---------

Co-authored-by: Jesus Federico <jesus@123it.ca>
  • Loading branch information
ahmed-abdou1 and jfederico authored Apr 12, 2024
1 parent 1811a8e commit 8526e24
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions app/controllers/concerns/bbb_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ def create_meeting
lockSettingsDisableNote: string_to_bool(@chosen_room.lockSettingsDisableNote),
lockSettingsDisablePrivateChat: string_to_bool(@chosen_room.lockSettingsDisablePrivateChat),
lockSettingsDisablePublicChat: string_to_bool(@chosen_room.lockSettingsDisablePublicChat),
guestPolicy: string_to_bool(@chosen_room.guestPolicy) ? 'ASK_MODERATOR' : 'ALWAYS_ACCEPT',
autoStartRecording: string_to_bool(@chosen_room.autoStartRecording),
allowStartStopRecording: string_to_bool(@chosen_room.allowStartStopRecording),
'meta_description': @chosen_room.description.truncate(128, separator: ' '),
Expand Down
3 changes: 2 additions & 1 deletion app/models/room.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class Room < ApplicationRecord
validates :code, uniqueness: true

store_accessor :settings, [:lockSettingsDisableCam, :lockSettingsDisableMic, :lockSettingsDisablePrivateChat, :lockSettingsDisablePublicChat, :lockSettingsDisableNote]
store_accessor :settings, [:waitForModerator, :allModerators, :record, :autoStartRecording, :allowStartStopRecording]
store_accessor :settings, %i[waitForModerator allModerators guestPolicy record autoStartRecording allowStartStopRecording]

# after_find is used for the following so that rooms that already exist will have these fields upon launch
after_find :initialize_setting_defaults, if: :settings_blank?
Expand Down Expand Up @@ -100,6 +100,7 @@ def initialize_setting_defaults
allowStartStopRecording: '1',
waitForModerator: '1',
allModerators: '0',
guestPolicy: '1',
record: '1',
}

Expand Down
2 changes: 2 additions & 0 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ en:
lockSettingsDisablePrivateChat: "Disable private chat in the meeting"
waitForModerator: "Viewers are unable to join until a moderator joins"
allModerators: "All users will join as moderators"
guestPolicy: "Require moderator approval before joining"
record: "Allows a playback file to be generated if a moderator clicks the Start/Stop Recording button at least once during the sesssion"
autoStartRecording: "Automatically start recording when the first user joins"
allowStartStopRecording: "If you select both 'auto start recording' and 'Enable the user to start/stop recording', then the entire length of the session will be recorded, and the moderators in the session will not be able to pause/resume the recording."
Expand All @@ -123,6 +124,7 @@ en:
lockSettingsDisableNote: "Disable shared notes"
lockSettingsDisablePublicChat: "Disable public chat"
lockSettingsDisablePrivateChat: "Disable private chat"
guestPolicy: "Enable guest policy"
waitForModerator: "Wait for moderator"
allModerators: "All moderators"
record: "Enable recording"
Expand Down

0 comments on commit 8526e24

Please sign in to comment.