only allow presenter to change slide
This commit is contained in:
parent
0b8a8c856b
commit
0546afce1f
@ -2,6 +2,7 @@ package org.bigbluebutton.core.apps.presentation
|
||||
|
||||
import org.bigbluebutton.common2.msgs._
|
||||
import org.bigbluebutton.core.running.OutMsgRouter
|
||||
import org.bigbluebutton.core.models.Users2x
|
||||
|
||||
trait SetCurrentPagePubMsgHdlr {
|
||||
this: PresentationApp2x =>
|
||||
@ -23,8 +24,10 @@ trait SetCurrentPagePubMsgHdlr {
|
||||
//record(event)
|
||||
}
|
||||
|
||||
if (Users2x.isPresenter(msg.header.userId, liveMeeting.users2x)) {
|
||||
if (setCurrentPage(msg.body.presentationId, msg.body.pageId)) {
|
||||
broadcastEvent(msg)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -92,6 +92,13 @@ object Users2x {
|
||||
}
|
||||
}
|
||||
|
||||
def isPresenter(intId: String, users: Users2x): Boolean = {
|
||||
findWithIntId(users, intId) match {
|
||||
case Some(u) => u.presenter
|
||||
case None => false
|
||||
}
|
||||
}
|
||||
|
||||
def findPresenter(users: Users2x): Option[UserState] = {
|
||||
users.toVector.find(u => u.presenter)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user