Fixing minor bugs in locked features while changing role
This commit is contained in:
parent
f5703f64bb
commit
966e2da55f
@ -95,13 +95,12 @@ package org.bigbluebutton.main.model.users
|
||||
}
|
||||
public function set role(r:String):void {
|
||||
_role = r;
|
||||
moderator = _role == MODERATOR;
|
||||
verifyUserStatus();
|
||||
}
|
||||
|
||||
public function get moderator():Boolean {
|
||||
return _role == MODERATOR;
|
||||
}
|
||||
|
||||
[Bindable] public var moderator:Boolean = false;
|
||||
|
||||
[Bindable] public var room:String = "";
|
||||
[Bindable] public var authToken:String = "";
|
||||
[Bindable] public var selected:Boolean = false;
|
||||
|
@ -115,7 +115,7 @@ $Id: $
|
||||
var conference:Conference = userManager.getConference();
|
||||
var me:BBBUser = conference.getMyUser();
|
||||
// trace(LOG + "allowMuteUnmute [ voiceJoined=[" + conference.voiceJoined + "], disableMic=[" + me.disableMyMic + "]");
|
||||
return (conference.voiceJoined && !me.disableMyMic);
|
||||
return (conference.voiceJoined && (!me.disableMyMic || me.moderator));
|
||||
}
|
||||
|
||||
private function updateMuteMeBtn(placeholder:Boolean = false):void {
|
||||
|
@ -26,7 +26,8 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
creationComplete="init()">
|
||||
|
||||
<mate:Listener type="{LockControlEvent.CHANGED_LOCK_SETTINGS}" method="lockSettingsChanged" />
|
||||
|
||||
<mate:Listener type="{ChangeMyRole.CHANGE_MY_ROLE_EVENT}" method="refreshRole" />
|
||||
|
||||
<mx:Script>
|
||||
<![CDATA[
|
||||
import com.asfusion.mate.events.Dispatcher;
|
||||
@ -42,6 +43,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
import org.bigbluebutton.core.managers.UserManager;
|
||||
import org.bigbluebutton.main.model.users.BBBUser;
|
||||
import org.bigbluebutton.main.model.users.Conference;
|
||||
import org.bigbluebutton.main.model.users.events.ChangeMyRole;
|
||||
import org.bigbluebutton.modules.chat.events.ChatOptionsEvent;
|
||||
import org.bigbluebutton.modules.chat.model.ChatOptions;
|
||||
import org.bigbluebutton.util.i18n.ResourceUtil;
|
||||
@ -94,16 +96,20 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
}
|
||||
|
||||
private function lockSettingsChanged(e:Event):void {
|
||||
|
||||
if (UsersUtil.amIModerator() || UsersUtil.amIPresenter()) return; // Settings only affect viewers.
|
||||
|
||||
var userManager:UserManager = UserManager.getInstance();
|
||||
var conference:Conference = userManager.getConference();
|
||||
var me:BBBUser = conference.getMyUser();
|
||||
|
||||
usersList.enabled = !me.disableMyPrivateChat;
|
||||
refreshListStatus();
|
||||
}
|
||||
|
||||
private function refreshRole(e:ChangeMyRole):void {
|
||||
refreshListStatus();
|
||||
}
|
||||
|
||||
private function refreshListStatus():void {
|
||||
var userManager:UserManager = UserManager.getInstance();
|
||||
var conference:Conference = userManager.getConference();
|
||||
var me:BBBUser = conference.getMyUser();
|
||||
|
||||
usersList.enabled = !me.disableMyPrivateChat || me.moderator;
|
||||
}
|
||||
|
||||
]]>
|
||||
</mx:Script>
|
||||
|
||||
|
@ -63,6 +63,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
<mate:Listener type="{ShortcutEvent.CHAT_DEBUG}" method="chatDebugInfo" />
|
||||
|
||||
<mate:Listener type="{LockControlEvent.CHANGED_LOCK_SETTINGS}" method="lockSettingsChanged" />
|
||||
<mate:Listener type="{ChangeMyRole.CHANGE_MY_ROLE_EVENT}" method="refreshRole" />
|
||||
|
||||
<mx:Script>
|
||||
<![CDATA[
|
||||
@ -81,6 +82,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
import org.bigbluebutton.main.events.UserLeftEvent;
|
||||
import org.bigbluebutton.main.model.users.BBBUser;
|
||||
import org.bigbluebutton.main.model.users.Conference;
|
||||
import org.bigbluebutton.main.model.users.events.ChangeMyRole;
|
||||
import org.bigbluebutton.modules.chat.ChatConstants;
|
||||
import org.bigbluebutton.modules.chat.ChatUtil;
|
||||
import org.bigbluebutton.modules.chat.events.ChatOptionsEvent;
|
||||
@ -624,20 +626,25 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
applyLockSettings();
|
||||
}
|
||||
|
||||
private function applyLockSettings():void {
|
||||
|
||||
if (UsersUtil.amIModerator() || UsersUtil.amIPresenter()) return; // Settings only affect viewers.
|
||||
|
||||
var userManager:UserManager = UserManager.getInstance();
|
||||
var conference:Conference = userManager.getConference();
|
||||
var me:BBBUser = conference.getMyUser();
|
||||
|
||||
if (publicChat) {
|
||||
txtMsgArea.enabled = sendBtn.enabled = !me.disableMyPublicChat;
|
||||
} else {
|
||||
txtMsgArea.enabled = sendBtn.enabled = !me.disableMyPrivateChat;
|
||||
}
|
||||
}
|
||||
private function applyLockSettings():void {
|
||||
updateChat();
|
||||
}
|
||||
|
||||
private function updateChat():void {
|
||||
var userManager:UserManager = UserManager.getInstance();
|
||||
var conference:Conference = userManager.getConference();
|
||||
var me:BBBUser = conference.getMyUser();
|
||||
|
||||
if (publicChat) {
|
||||
txtMsgArea.enabled = sendBtn.enabled = !me.disableMyPublicChat || me.moderator;
|
||||
} else {
|
||||
txtMsgArea.enabled = sendBtn.enabled = !me.disableMyPrivateChat || me.moderator;
|
||||
}
|
||||
}
|
||||
|
||||
private function refreshRole(e:ChangeMyRole):void {
|
||||
updateChat();
|
||||
}
|
||||
]]>
|
||||
|
||||
</mx:Script>
|
||||
|
@ -114,8 +114,7 @@ package org.bigbluebutton.modules.videoconf.maps
|
||||
}
|
||||
|
||||
private function displayToolbarButton():void {
|
||||
button.isPresenter = true;
|
||||
|
||||
button.isPresenter = UsersUtil.amIPresenter();
|
||||
if (options.presenterShareOnly) {
|
||||
if (UsersUtil.amIPresenter()) {
|
||||
button.isPresenter = true;
|
||||
|
@ -34,7 +34,8 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
<mate:Listener type="{BBBEvent.CAM_SETTINGS_CLOSED}" method="handleCamSettingsClosedEvent"/>
|
||||
<mate:Listener type="{ShareCameraRequestEvent.SHARE_CAMERA_REQUEST}" receive="enabled=false" />
|
||||
<mate:Listener type="{LockControlEvent.CHANGED_LOCK_SETTINGS}" method="lockSettingsChanged" />
|
||||
|
||||
<mate:Listener type="{ChangeMyRole.CHANGE_MY_ROLE_EVENT}" method="refreshRole" />
|
||||
|
||||
<mx:Script>
|
||||
<![CDATA[
|
||||
import com.asfusion.mate.events.Dispatcher;
|
||||
@ -46,6 +47,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
import org.bigbluebutton.main.events.ShortcutEvent;
|
||||
import org.bigbluebutton.main.model.users.BBBUser;
|
||||
import org.bigbluebutton.main.model.users.Conference;
|
||||
import org.bigbluebutton.main.model.users.events.ChangeMyRole;
|
||||
import org.bigbluebutton.main.views.MainToolbar;
|
||||
import org.bigbluebutton.modules.videoconf.events.ClosePublishWindowEvent;
|
||||
import org.bigbluebutton.modules.videoconf.events.ShareCameraRequestEvent;
|
||||
@ -63,15 +65,23 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
private var dispatcher:Dispatcher;
|
||||
|
||||
public function lockSettingsChanged(e:*):void{
|
||||
var userManager:UserManager = UserManager.getInstance();
|
||||
var conference:Conference = userManager.getConference();
|
||||
var me:BBBUser = conference.getMyUser();
|
||||
|
||||
this.visible = me.moderator || !me.disableMyCam;
|
||||
this.includeInLayout = me.moderator || !me.disableMyCam;
|
||||
}
|
||||
|
||||
public function lockSettingsChanged(e:*):void{
|
||||
updateButton();
|
||||
}
|
||||
|
||||
private function refreshRole(e:ChangeMyRole):void {
|
||||
updateButton();
|
||||
}
|
||||
|
||||
private function updateButton():void {
|
||||
var userManager:UserManager = UserManager.getInstance();
|
||||
var conference:Conference = userManager.getConference();
|
||||
var me:BBBUser = conference.getMyUser();
|
||||
|
||||
this.visible = me.moderator || !me.disableMyCam;
|
||||
this.includeInLayout = me.moderator || !me.disableMyCam;
|
||||
}
|
||||
|
||||
private function init():void{
|
||||
dispatcher = new Dispatcher();
|
||||
this.toolTip = ResourceUtil.getInstance().getString('bbb.toolbar.video.toolTip.start');
|
||||
@ -84,6 +94,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
public function set isPresenter(presenter:Boolean):void {
|
||||
visible = presenter;
|
||||
this.includeInLayout = presenter;
|
||||
}
|
||||
|
||||
public function remoteClick(e:ShortcutEvent):void{
|
||||
|
Loading…
Reference in New Issue
Block a user