Map presenterShareOnly options to lock settings.

This commit is contained in:
Ghazi Triki 2017-05-15 22:05:00 +01:00
parent b9f75f88ae
commit 450c5d28f3

View File

@ -491,16 +491,46 @@ package org.bigbluebutton.main.model.users {
lockOnJoin:Boolean,
lockOnJoinConfigurable:Boolean;
var lockConfig:XML;
var viedoConfig:XML;
var phoneConfig:XML;
var presenterOnlyShareVideo:Boolean;
var presenterOnlyShareAudio:Boolean;
if (config != null) {
lockConfig = config.lock;
viedoConfig = BBB.getConfigForModule("VideoconfModule");
phoneConfig = BBB.getConfigForModule("PhoneModule");
if (viedoConfig.@presenterShareOnly != undefined) {
presenterOnlyShareVideo = (viedoConfig.@presenterShareOnly.toString().toUpperCase() == "TRUE") ? true : false;
}
if (phoneConfig.@presenterShareOnly != undefined) {
presenterOnlyShareAudio = (phoneConfig.@presenterShareOnly.toString().toUpperCase() == "TRUE");
}
}
try {
disableCam = (lockConfig.@disableCamForLockedUsers.toUpperCase() == "TRUE");
lockOnJoin = (lockConfig.@lockOnJoin.toUpperCase() == "TRUE");
} catch (e:Error) {
lockOnJoin = true; //If not set, default to true
}
try {
// For retro-compatibilty if presenterShareOnly if video config is true it rules the lockOnJoin and disableCam lock options
if (presenterOnlyShareVideo) {
lockOnJoin = true;
disableCam = true;
}
else {
disableCam = (lockConfig.@disableCamForLockedUsers.toUpperCase() == "TRUE");
}
} catch (e:Error) {
disableCam = false; //If not set, default to false
}
try {
disableMic = (lockConfig.@disableMicForLockedUsers.toUpperCase() == "TRUE");
// For retro-compatibilty if presenterShareOnly if phone config is true it rules the lockOnJoin and disableMic lock options
if (presenterOnlyShareVideo) {
lockOnJoin = true;
disableMic = true;
} else {
disableMic = (lockConfig.@disableMicForLockedUsers.toUpperCase() == "TRUE");
}
} catch (e:Error) {
disableMic = false; //If not set, default to false
}
@ -519,11 +549,6 @@ package org.bigbluebutton.main.model.users {
} catch (e:Error) {
lockedLayout = false; //If not set, default to false
}
try {
lockOnJoin = (lockConfig.@lockOnJoin.toUpperCase() == "TRUE");
} catch (e:Error) {
lockOnJoin = true; //If not set, default to true
}
try {
lockOnJoinConfigurable = (lockConfig.@lockOnJoinConfigurable.toUpperCase() == "TRUE");
} catch (e:Error) {