Skip to content
Snippets Groups Projects
Commit ae788b9b authored by Richard Alam's avatar Richard Alam
Browse files

Merge branch 'capilkey-restrict-remote-layout' into bbb-2x-mconf

parents fd901baf 4889f663
No related branches found
No related tags found
No related merge requests found
......@@ -27,5 +27,5 @@ class Layouts {
private var setByUser: String = "system";
private var currentLayout = "";
// this is not being set by the client, and we need to apply the layouts to all users, not just viewers, so will keep the default value of this as false
private var affectViewersOnly = false
private var affectViewersOnly = true
}
package org.bigbluebutton.modules.layout.services {
import com.asfusion.mate.events.Dispatcher;
import flash.events.TimerEvent;
import flash.utils.Timer;
import org.as3commons.logging.api.ILogger;
import org.as3commons.logging.api.getClassLogger;
import org.bigbluebutton.core.BBB;
......@@ -67,7 +67,19 @@ package org.bigbluebutton.modules.layout.services {
}
private function handleBroadcastLayoutEvtMsg(message:Object):void {
handleSyncLayout(message.body);
var affectedUsers:Array = message.body.applyTo as Array;
var appliesToMe:Boolean = false;
var myUserId:String = UsersUtil.getMyUserID();
for (var i:int = 0; i < affectedUsers.length; i++) {
if (affectedUsers[i] == myUserId) {
appliesToMe = true;
break;
}
}
if (appliesToMe)
handleSyncLayout(message.body);
}
/*
......@@ -87,7 +99,7 @@ package org.bigbluebutton.modules.layout.services {
private function onReceivedFirstLayout(message:Object):void {
LOGGER.debug("LayoutService: handling the first layout. locked = [{0}] layout = [{1}]", [message.locked, message.layout]);
trace("LayoutService: handling the first layout. locked = [" + message.locked + "] layout = [" + message.layout + "], moderator = [" + UsersUtil.amIModerator() + "]");
if (message.layout == "")
if (message.layout == "" || UsersUtil.amIModerator())
_dispatcher.dispatchEvent(new LayoutEvent(LayoutEvent.APPLY_DEFAULT_LAYOUT_EVENT));
else {
handleSyncLayout(message);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment