When authenticatedGuests is disabled, guests should be fit for promotion

This commit is contained in:
Pedro Beschorner Marin 2019-05-17 17:31:36 +00:00
parent 4274999ae6
commit 19cbef1fd9

View File

@ -28,8 +28,9 @@ trait ChangeUserRoleCmdMsgHdlr extends RightsManagementTrait {
} yield { } yield {
RegisteredUsers.updateUserRole(liveMeeting.registeredUsers, u, userRole) RegisteredUsers.updateUserRole(liveMeeting.registeredUsers, u, userRole)
} }
// Mconf's guest should always be fit for promotion
if (msg.body.role == Roles.MODERATOR_ROLE && !uvo.guest) { val promoteGuest = !liveMeeting.props.usersProp.authenticatedGuest
if (msg.body.role == Roles.MODERATOR_ROLE && (!uvo.guest || promoteGuest)) {
// Promote non-guest users. // Promote non-guest users.
Users2x.changeRole(liveMeeting.users2x, uvo, msg.body.role) Users2x.changeRole(liveMeeting.users2x, uvo, msg.body.role)
val event = buildUserRoleChangedEvtMsg(liveMeeting.props.meetingProp.intId, msg.body.userId, val event = buildUserRoleChangedEvtMsg(liveMeeting.props.meetingProp.intId, msg.body.userId,