Merge pull request #21478 from germanocaumo/bbb-breakout-room-permissions
feat: allow parent room moderators to kick other users in breakouts
This commit is contained in:
commit
0cb406a846
@ -63,13 +63,23 @@ object BreakoutRoomsUtil extends SystemConfiguration {
|
||||
checksum(apiCall.concat(baseString).concat(sharedSecret))
|
||||
}
|
||||
|
||||
def joinParams(username: String, userId: String, isBreakout: Boolean, breakoutMeetingId: String,
|
||||
password: String): (collection.immutable.Map[String, String], collection.immutable.Map[String, String]) = {
|
||||
def joinParams(
|
||||
username: String,
|
||||
userId: String,
|
||||
isBreakout: Boolean,
|
||||
breakoutMeetingId: String,
|
||||
avatarURL: String,
|
||||
role: String,
|
||||
password: String
|
||||
): (collection.immutable.Map[String, String], collection.immutable.Map[String, String]) = {
|
||||
val moderator = role == "MODERATOR"
|
||||
val params = collection.immutable.HashMap(
|
||||
"fullName" -> urlEncode(username),
|
||||
"userID" -> urlEncode(userId),
|
||||
"isBreakout" -> urlEncode(isBreakout.toString()),
|
||||
"meetingID" -> urlEncode(breakoutMeetingId),
|
||||
"avatarURL" -> urlEncode(avatarURL),
|
||||
"userdata-bbb_parent_room_moderator" -> urlEncode(moderator.toString()),
|
||||
"password" -> urlEncode(password),
|
||||
"redirect" -> urlEncode("true")
|
||||
)
|
||||
|
@ -41,8 +41,15 @@ object BreakoutHdlrHelpers extends SystemConfiguration {
|
||||
for {
|
||||
user <- Users2x.findWithIntId(liveMeeting.users2x, userId)
|
||||
apiCall = "join"
|
||||
(redirectParams, redirectToHtml5Params) = BreakoutRoomsUtil.joinParams(user.name, userId + "-" + roomSequence, true,
|
||||
externalMeetingId, liveMeeting.props.password.moderatorPass)
|
||||
(redirectParams, redirectToHtml5Params) = BreakoutRoomsUtil.joinParams(
|
||||
user.name,
|
||||
userId + "-" + roomSequence,
|
||||
true,
|
||||
externalMeetingId,
|
||||
user.avatar,
|
||||
user.role,
|
||||
liveMeeting.props.password.moderatorPass
|
||||
)
|
||||
// We generate a first url with redirect -> true
|
||||
redirectBaseString = BreakoutRoomsUtil.createBaseString(redirectParams)
|
||||
redirectJoinURL = BreakoutRoomsUtil.createJoinURL(bbbWebAPI, apiCall, redirectBaseString,
|
||||
|
@ -26,7 +26,7 @@ trait EjectUserFromMeetingCmdMsgHdlr extends RightsManagementTrait {
|
||||
PermissionCheck.VIEWER_LEVEL,
|
||||
liveMeeting.users2x,
|
||||
msg.header.userId
|
||||
) || liveMeeting.props.meetingProp.isBreakout) {
|
||||
)) {
|
||||
|
||||
val reason = "No permission to eject user from meeting."
|
||||
PermissionCheck.ejectUserForFailedPermission(meetingId, msg.header.userId, reason, outGW, liveMeeting)
|
||||
|
@ -6,6 +6,7 @@ import {
|
||||
import Auth from '/imports/ui/services/auth';
|
||||
import logger from '/imports/startup/client/logger';
|
||||
import { toggleMuteMicrophone } from '/imports/ui/components/audio/audio-graphql/audio-controls/input-stream-live-selector/service';
|
||||
import getFromUserSettings from '/imports/ui/services/users-settings';
|
||||
|
||||
export const isVoiceOnlyUser = (userId: string) => userId.toString().startsWith('v_');
|
||||
|
||||
@ -25,6 +26,9 @@ export const generateActionsPermissions = (
|
||||
const isDialInUser = isVoiceOnlyUser(subjectUser.userId);
|
||||
const amISubjectUser = isMe(subjectUser.userId);
|
||||
const isSubjectUserModerator = subjectUser.isModerator;
|
||||
// Breakout rooms mess up with role permissions
|
||||
// A breakout room user that has a moderator role in it's parent room
|
||||
const parentRoomModerator = getFromUserSettings('bbb_parent_room_moderator', false);
|
||||
const isSubjectUserGuest = subjectUser.guest;
|
||||
const hasAuthority = currentUser.isModerator || amISubjectUser;
|
||||
const allowedToChatPrivately = !amISubjectUser && !isDialInUser;
|
||||
@ -42,7 +46,7 @@ export const generateActionsPermissions = (
|
||||
// if currentUser is a moderator, allow removing other users
|
||||
const allowedToRemove = amIModerator
|
||||
&& !amISubjectUser
|
||||
&& !isBreakout;
|
||||
&& (!isBreakout || parentRoomModerator);
|
||||
|
||||
const allowedToPromote = amIModerator
|
||||
&& !amISubjectUser
|
||||
|
@ -1398,8 +1398,8 @@ Useful tools for development:
|
||||
| `userdata-bbb_skip_echotest_if_previous_device=` | (Introduced in BigBlueButton 3.0) If set to `true`, the user will not see the "echo test" if session has valid input/output devices stored previously | `false` |
|
||||
| `userdata-bbb_override_default_locale=` | (Introduced in BigBlueButton 2.3) If set to `de`, the user's browser preference will be ignored - the client will be shown in 'de' (i.e. German) regardless of the otherwise preferred locale 'en' (or other) | `null` |
|
||||
| `userdata-bbb_hide_presentation_on_join` | (Introduced in BigBlueButton 2.6) If set to `true` it will make the user enter the meeting with presentation minimized (Only for non-presenters), not permanent.
|
||||
|
||||
| `userdata-bbb_direct_leave_button` | (Introduced in BigBlueButton 2.7) If set to `true` it will make a button to leave the meeting appear to the left of the Options menu. | `false` | | `false` |
|
||||
| `userdata-bbb_direct_leave_button` | (Introduced in BigBlueButton 2.7) If set to `true` it will make a button to leave the meeting appear to the left of the Options menu. | `false` |
|
||||
| `userdata-bbb_parent_room_moderator=` | (Introduced in BigBlueButton 3.0) Only used in breakouts: if set to `true`, user will have permission to kick other users inside the breakout | `false`
|
||||
|
||||
#### Branding parameters
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user