Merge pull request #4 from GuiLeme/I-18137-back-end-tweak
[I-18101-back-end-tweak] - back-end portion - review changes
This commit is contained in:
commit
29be67e226
@ -9,14 +9,7 @@ trait CreateTimerPubMsgHdlr extends RightsManagementTrait {
|
||||
this: TimerApp2x =>
|
||||
|
||||
def handle(msg: CreateTimerPubMsg, liveMeeting: LiveMeeting, bus: MessageBus): Unit = {
|
||||
val isTimerFeatureEnabled: Boolean = !liveMeeting.props.meetingProp.disabledFeatures.contains("timer")
|
||||
|
||||
if (!isTimerFeatureEnabled) {
|
||||
log.error("Timer feature is disabled for meeting {}, meetingId={}", liveMeeting.props.meetingProp.name,
|
||||
liveMeeting.props.meetingProp.intId)
|
||||
} else {
|
||||
log.debug("Received CreateTimerPubMsg {}", CreateTimerPubMsg)
|
||||
TimerModel.createTimer(liveMeeting.timerModel, msg.body.stopwatch, msg.body.time, msg.body.accumulated, msg.body.track)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -23,12 +23,6 @@ trait DeactivateTimerReqMsgHdlr extends RightsManagementTrait {
|
||||
bus.outGW.send(msgEvent)
|
||||
}
|
||||
|
||||
val isTimerFeatureEnabled: Boolean = !liveMeeting.props.meetingProp.disabledFeatures.contains("timer")
|
||||
|
||||
if (!isTimerFeatureEnabled) {
|
||||
log.error("Timer feature is disabled for meeting {}, meetingId={}", liveMeeting.props.meetingProp.name,
|
||||
liveMeeting.props.meetingProp.intId)
|
||||
} else {
|
||||
if (permissionFailed(PermissionCheck.MOD_LEVEL, PermissionCheck.VIEWER_LEVEL, liveMeeting.users2x, msg.header.userId) &&
|
||||
permissionFailed(PermissionCheck.GUEST_LEVEL, PermissionCheck.PRESENTER_LEVEL, liveMeeting.users2x, msg.header.userId)) {
|
||||
val meetingId = liveMeeting.props.meetingProp.intId
|
||||
@ -40,4 +34,3 @@ trait DeactivateTimerReqMsgHdlr extends RightsManagementTrait {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -23,14 +23,6 @@ trait ResetTimerReqMsgHdlr extends RightsManagementTrait {
|
||||
bus.outGW.send(msgEvent)
|
||||
}
|
||||
|
||||
val isTimerFeatureEnabled: Boolean = !liveMeeting.props.meetingProp.disabledFeatures.contains("timer")
|
||||
|
||||
if (!isTimerFeatureEnabled) {
|
||||
log.error(
|
||||
"Timer feature is disabled for meeting {}, meetingId={}",
|
||||
liveMeeting.props.meetingProp.name, liveMeeting.props.meetingProp.intId
|
||||
)
|
||||
} else {
|
||||
if (permissionFailed(PermissionCheck.MOD_LEVEL, PermissionCheck.VIEWER_LEVEL, liveMeeting.users2x, msg.header.userId) &&
|
||||
permissionFailed(PermissionCheck.GUEST_LEVEL, PermissionCheck.PRESENTER_LEVEL, liveMeeting.users2x, msg.header.userId)) {
|
||||
val meetingId = liveMeeting.props.meetingProp.intId
|
||||
@ -41,4 +33,3 @@ trait ResetTimerReqMsgHdlr extends RightsManagementTrait {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -25,14 +25,6 @@ trait SetTimerReqMsgHdlr extends RightsManagementTrait {
|
||||
bus.outGW.send(msgEvent)
|
||||
}
|
||||
|
||||
val isTimerFeatureEnabled: Boolean = !liveMeeting.props.meetingProp.disabledFeatures.contains("timer")
|
||||
|
||||
if (!isTimerFeatureEnabled) {
|
||||
log.error(
|
||||
"Timer feature is disabled for meeting {}, meetingId={}",
|
||||
liveMeeting.props.meetingProp.name, liveMeeting.props.meetingProp.intId
|
||||
)
|
||||
} else {
|
||||
if (permissionFailed(PermissionCheck.MOD_LEVEL, PermissionCheck.VIEWER_LEVEL, liveMeeting.users2x, msg.header.userId) &&
|
||||
permissionFailed(PermissionCheck.GUEST_LEVEL, PermissionCheck.PRESENTER_LEVEL, liveMeeting.users2x, msg.header.userId)) {
|
||||
val meetingId = liveMeeting.props.meetingProp.intId
|
||||
@ -44,4 +36,3 @@ trait SetTimerReqMsgHdlr extends RightsManagementTrait {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -25,14 +25,6 @@ trait SetTrackReqMsgHdlr extends RightsManagementTrait {
|
||||
bus.outGW.send(msgEvent)
|
||||
}
|
||||
|
||||
val isTimerFeatureEnabled: Boolean = !liveMeeting.props.meetingProp.disabledFeatures.contains("timer")
|
||||
|
||||
if (!isTimerFeatureEnabled) {
|
||||
log.error(
|
||||
"Timer feature is disabled for meeting {}, meetingId={}",
|
||||
liveMeeting.props.meetingProp.name, liveMeeting.props.meetingProp.intId
|
||||
)
|
||||
} else {
|
||||
if (permissionFailed(PermissionCheck.MOD_LEVEL, PermissionCheck.VIEWER_LEVEL, liveMeeting.users2x, msg.header.userId) &&
|
||||
permissionFailed(PermissionCheck.GUEST_LEVEL, PermissionCheck.PRESENTER_LEVEL, liveMeeting.users2x, msg.header.userId)) {
|
||||
val meetingId = liveMeeting.props.meetingProp.intId
|
||||
@ -44,4 +36,3 @@ trait SetTrackReqMsgHdlr extends RightsManagementTrait {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -23,12 +23,6 @@ trait StartTimerReqMsgHdlr extends RightsManagementTrait {
|
||||
bus.outGW.send(msgEvent)
|
||||
}
|
||||
|
||||
val isTimerFeatureEnabled: Boolean = !liveMeeting.props.meetingProp.disabledFeatures.contains("timer")
|
||||
|
||||
if (!isTimerFeatureEnabled) {
|
||||
log.error("Timer feature is disabled for meeting {}, meetingId={}", liveMeeting.props.meetingProp.name,
|
||||
liveMeeting.props.meetingProp.intId)
|
||||
} else {
|
||||
if (permissionFailed(PermissionCheck.MOD_LEVEL, PermissionCheck.VIEWER_LEVEL, liveMeeting.users2x, msg.header.userId) &&
|
||||
permissionFailed(PermissionCheck.GUEST_LEVEL, PermissionCheck.PRESENTER_LEVEL, liveMeeting.users2x, msg.header.userId)) {
|
||||
val meetingId = liveMeeting.props.meetingProp.intId
|
||||
@ -41,4 +35,3 @@ trait StartTimerReqMsgHdlr extends RightsManagementTrait {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -25,12 +25,6 @@ trait StopTimerReqMsgHdlr extends RightsManagementTrait {
|
||||
bus.outGW.send(msgEvent)
|
||||
}
|
||||
|
||||
val isTimerFeatureEnabled: Boolean = !liveMeeting.props.meetingProp.disabledFeatures.contains("timer")
|
||||
|
||||
if (!isTimerFeatureEnabled) {
|
||||
log.error("Timer feature is disabled for meeting {}, meetingId={}", liveMeeting.props.meetingProp.name,
|
||||
liveMeeting.props.meetingProp.intId)
|
||||
} else {
|
||||
if (permissionFailed(PermissionCheck.MOD_LEVEL, PermissionCheck.VIEWER_LEVEL, liveMeeting.users2x, msg.header.userId) &&
|
||||
permissionFailed(PermissionCheck.GUEST_LEVEL, PermissionCheck.PRESENTER_LEVEL, liveMeeting.users2x, msg.header.userId) &&
|
||||
msg.header.userId != "nodeJSapp") {
|
||||
@ -44,4 +38,3 @@ trait StopTimerReqMsgHdlr extends RightsManagementTrait {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -25,12 +25,6 @@ trait SwitchTimerReqMsgHdlr extends RightsManagementTrait {
|
||||
bus.outGW.send(msgEvent)
|
||||
}
|
||||
|
||||
val isTimerFeatureEnabled: Boolean = !liveMeeting.props.meetingProp.disabledFeatures.contains("timer")
|
||||
|
||||
if (!isTimerFeatureEnabled) {
|
||||
log.error("Timer feature is disabled for meeting {}, meetingId={}", liveMeeting.props.meetingProp.name,
|
||||
liveMeeting.props.meetingProp.intId)
|
||||
} else {
|
||||
if (permissionFailed(PermissionCheck.MOD_LEVEL, PermissionCheck.VIEWER_LEVEL, liveMeeting.users2x, msg.header.userId) &&
|
||||
permissionFailed(PermissionCheck.GUEST_LEVEL, PermissionCheck.PRESENTER_LEVEL, liveMeeting.users2x, msg.header.userId)) {
|
||||
val meetingId = liveMeeting.props.meetingProp.intId
|
||||
@ -46,4 +40,3 @@ trait SwitchTimerReqMsgHdlr extends RightsManagementTrait {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user