Merge pull request #11383 from aron-2809/fix-issue-11182
User role is incorrect after client reconnect.
This commit is contained in:
commit
71eb8cc664
@ -21,7 +21,7 @@ trait ChangeUserRoleCmdMsgHdlr extends RightsManagementTrait {
|
|||||||
uvo <- Users2x.findWithIntId(liveMeeting.users2x, msg.body.userId)
|
uvo <- Users2x.findWithIntId(liveMeeting.users2x, msg.body.userId)
|
||||||
} yield {
|
} yield {
|
||||||
|
|
||||||
val userRole = if (uvo.role == Roles.MODERATOR_ROLE) "MODERATOR" else "VIEWER"
|
val userRole = if (msg.body.role == Roles.MODERATOR_ROLE) Roles.MODERATOR_ROLE else Roles.VIEWER_ROLE
|
||||||
for {
|
for {
|
||||||
// Update guest from waiting list
|
// Update guest from waiting list
|
||||||
u <- RegisteredUsers.findWithUserId(uvo.intId, liveMeeting.registeredUsers)
|
u <- RegisteredUsers.findWithUserId(uvo.intId, liveMeeting.registeredUsers)
|
||||||
@ -33,12 +33,12 @@ trait ChangeUserRoleCmdMsgHdlr extends RightsManagementTrait {
|
|||||||
// 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,
|
||||||
msg.body.changedBy, "MODERATOR")
|
msg.body.changedBy, Roles.MODERATOR_ROLE)
|
||||||
outGW.send(event)
|
outGW.send(event)
|
||||||
} else if (msg.body.role == Roles.VIEWER_ROLE) {
|
} else if (msg.body.role == Roles.VIEWER_ROLE) {
|
||||||
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,
|
||||||
msg.body.changedBy, "VIEWER")
|
msg.body.changedBy, Roles.VIEWER_ROLE)
|
||||||
outGW.send(event)
|
outGW.send(event)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user