You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openmeetings.apache.org by so...@apache.org on 2015/09/29 15:49:55 UTC

svn commit: r1705864 - in /openmeetings: branches/3.0.x/WebContent/src/modules/conference/restricted/ branches/3.0.x/WebContent/swf10/ branches/3.0.x/src/main/java/org/apache/openmeetings/remote/ trunk/singlewebapp/openmeetings-core/src/main/java/org/a...

Author: solomax
Date: Tue Sep 29 13:49:55 2015
New Revision: 1705864

URL: http://svn.apache.org/viewvc?rev=1705864&view=rev
Log:
[OPENMEETINGS-1252] allow/deny sharing works as expected

Modified:
    openmeetings/branches/3.0.x/WebContent/src/modules/conference/restricted/moderationMiniIconRestricted.lzx
    openmeetings/branches/3.0.x/WebContent/src/modules/conference/restricted/restrictedUserListInner.lzx
    openmeetings/branches/3.0.x/WebContent/swf10/commonVideoViewContentSWF10.lzx
    openmeetings/branches/3.0.x/src/main/java/org/apache/openmeetings/remote/WhiteBoardService.java
    openmeetings/trunk/singlewebapp/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/WhiteBoardService.java

Modified: openmeetings/branches/3.0.x/WebContent/src/modules/conference/restricted/moderationMiniIconRestricted.lzx
URL: http://svn.apache.org/viewvc/openmeetings/branches/3.0.x/WebContent/src/modules/conference/restricted/moderationMiniIconRestricted.lzx?rev=1705864&r1=1705863&r2=1705864&view=diff
==============================================================================
--- openmeetings/branches/3.0.x/WebContent/src/modules/conference/restricted/moderationMiniIconRestricted.lzx (original)
+++ openmeetings/branches/3.0.x/WebContent/src/modules/conference/restricted/moderationMiniIconRestricted.lzx Tue Sep 29 13:49:55 2015
@@ -255,7 +255,7 @@
     	<attribute name="isActive" value="true" type="boolean" />
         <handler name="onclick">
         	<![CDATA[
-                if ($debug) Debug.write("Deny Screen: ",parent.parent.parent.refObj.publicSID);
+                if ($debug) Debug.write("Deny Remote: ",parent.parent.parent.refObj.publicSID);
                 if (canvas.ismoderator && this.isActive) {
                 	canvas.thishib.setCanRemote.publicSID = parent.parent.parent.refObj.publicSID;
                     canvas.thishib.setCanRemote.canRemote = false;
@@ -269,7 +269,7 @@
     <miniIcons name="_denyRemote" x="60" width="16" height="16"  opacity="0.5"
                resource="remote_allow_rsc" showhandcursor="true">
         <handler name="onclick">
-            if ($debug) Debug.write("Allow Screen: ",parent.parent.parent.refObj.publicSID);
+            if ($debug) Debug.write("Allow Remote: ",parent.parent.parent.refObj.publicSID);
             if (canvas.ismoderator) {
                 canvas.thishib.setCanRemote.publicSID = parent.parent.parent.refObj.publicSID;
                 canvas.thishib.setCanRemote.canRemote = true;

Modified: openmeetings/branches/3.0.x/WebContent/src/modules/conference/restricted/restrictedUserListInner.lzx
URL: http://svn.apache.org/viewvc/openmeetings/branches/3.0.x/WebContent/src/modules/conference/restricted/restrictedUserListInner.lzx?rev=1705864&r1=1705863&r2=1705864&view=diff
==============================================================================
--- openmeetings/branches/3.0.x/WebContent/src/modules/conference/restricted/restrictedUserListInner.lzx (original)
+++ openmeetings/branches/3.0.x/WebContent/src/modules/conference/restricted/restrictedUserListInner.lzx Tue Sep 29 13:49:55 2015
@@ -420,202 +420,79 @@
         
         <handler name="onismoderator" reference="canvas" args="m">
             if ($debug) Debug.write("###### ismoderator ",m);
-            <![CDATA[
-                this.updateIcons();
-            ]]>
-        </handler>
-        
-        <handler name="onmicMutedStatusChangedItem" reference="canvas" args="roomClientObj">
-        	<![CDATA[
-        	
-        	   if ($debug) Debug.write(" :: onmicMutedStatusChangedItem :: ",roomClientObj.micMuted);
-        	   
-                var vList = parent._table.renderList;
-                for (var i=0;i<vList.length;i++) {
-                    //vList[i].updateIconByMod();
-                    if (vList[i].publicSID == roomClientObj.publicSID) {
-                        parent._table.renderList[i].micMuted = roomClientObj.micMuted;
-                        break;
-                    }
-                }
-        	   
-        	   //search for the user and update its drawStatusIcon
-                var vList = parent._table._innerlist._inn._inn.subviews;
-                for (var i=0;i<vList.length;i++) {
-                    //vList[i].updateIconByMod();
-                    if (vList[i].refObj.publicSID == roomClientObj.publicSID) {
-                        vList[i].refObj.micMuted = roomClientObj.micMuted;
-                        vList[i].micMuted = roomClientObj.micMuted;
-                        vList[i].updateModeratorIcons();
-                        break;
-                    }
-                }
-        	   
-                if (parent._applyAndStatusIcons != null) {
-                	parent._applyAndStatusIcons.updateIcons();
-                }
-        	]]>
+            this.updateIcons();
         </handler>
         
-        <handler name="ondrawAllowStatus" reference="canvas" args="drawObject">
-            <![CDATA[
-            
-                if ($debug) Debug.write(" :: ondrawAllowStatus :: ",drawObject.canDraw);
-            
-            	var vList = parent._table.renderList;
-                for (var i=0;i<vList.length;i++) {
-                    //vList[i].updateIconByMod();
-                    if (vList[i].publicSID == drawObject.publicSID) {
-                        parent._table.renderList[i].canDraw = drawObject.canDraw;
-                        parent._table.renderList[i].canShare = drawObject.canShare;
-                        parent._table.renderList[i].canRemote = drawObject.canRemote;
-                        break;
-                    }
-                }
-            
-                //search for the user and update its drawStatusIcon
-                var vList = parent._table._innerlist._inn._inn.subviews;
-                for (var i=0;i<vList.length;i++) {
-                    //vList[i].updateIconByMod();
-                    if (vList[i].refObj.publicSID == drawObject.publicSID) {
-                        vList[i].refObj.canDraw = drawObject.canDraw;
-                        vList[i].canDraw = drawObject.canDraw;
-                        vList[i].canShare = drawObject.canShare;
-                        vList[i].canRemote = drawObject.canRemote;
-                        vList[i].updateIconByModScroll();
-                        vList[i].updateModeratorIcons();
-                        break;
-                    }
-                }
-
-                if (parent._applyAndStatusIcons != null) {
-                	parent._applyAndStatusIcons.updateIcons();
-                }
-            ]]>
-        </handler>
-
-        <handler name="onexclusiveAudioAllowStatus" reference="canvas" args="rclObject">
-            <![CDATA[
+		<handler name="onmicMutedStatusChangedItem" reference="canvas" args="roomClientObj">
+			updateIcons(roomClientObj);
+		</handler>
+        
+		<handler name="ondrawAllowStatus" reference="canvas" args="drawObject">
+			updateIcons(drawObject);
+		</handler>
 
-                if ($debug) Debug.write(" :: exclusiveAudioAllowStatus :: ",rclObject.canGiveAudio);
-				
-                var vList = parent._table.renderList;
-                for (var i=0;i<vList.length;i++) {
-                    if (vList[i].publicSID == rclObject.publicSID) {
-                        parent._table.renderList[i].canGiveAudio = rclObject.canGiveAudio;
-                        break;
-                    }
-                }
-				
-                //search for the user and update its exclusiveAudioStatusIcon
-                var vList = parent._table._innerlist._inn._inn.subviews;
-                for (var i=0;i<vList.length;i++) {
-                    if (vList[i].refObj.publicSID == rclObject.publicSID) {
-                        vList[i].refObj.canGiveAudio = rclObject.canGiveAudio;
-                        vList[i].canGiveAudio = rclObject.canGiveAudio;
-                        vList[i].updateIconByModScroll();
-                        vList[i].updateModeratorIcons();
-                        break;
-                    }
-                }
-
-                if (parent._applyAndStatusIcons != null) {
-                	parent._applyAndStatusIcons.updateIcons();
-                }
-            ]]>
-        </handler>
-        
-        <handler name="onlastBroadCastingUser" reference="canvas" args="userObject">
-            <![CDATA[
-            
-               if ($debug) Debug.write(" :: onlastBroadCastingUser :: ");
-                
-                if (!userObject.isBroadcasting) {
-                    //Stop Broadcasting and close Dialog
-                    //Search, stop and remove video
-                    parent.parent.removeVideoByUser(userObject);
-                }
-                
-                var vList = parent._table.renderList;
-                for (var i=0;i<vList.length;i++) {
-                    if (vList[i].publicSID == userObject.publicSID) {
-                        parent._table.renderList[i].isBroadcasting = userObject.isBroadcasting;
-                        break;
-                    }
-                }
-                
-                //search for the user and update its drawStatusIcon
-                var vList = parent._table._innerlist._inn._inn.subviews;
-                for (var i=0;i<vList.length;i++) {
-                    if (vList[i].refObj.publicSID == userObject.publicSID) {
-                        vList[i].isBroadcasting = userObject.isBroadcasting;
-                        vList[i].updateModeratorIcons();
-                        break;
-                    }
-                }
-                
-                if (parent._applyAndStatusIcons != null) {
-                	parent._applyAndStatusIcons.updateIcons();
-                }
-            ]]>
-        </handler>
-        
-        <method name="updateIcons">
-            <![CDATA[
-            
-                if ($debug) Debug.write(" :: updateIcons :: ");
-                
-                for (var i=0;i<parent._table.renderList.length;i++) {
-                
-                    for (var k=0;k<canvas.newModeratorList.length;k++) {
-                        
-                        var item = canvas.newModeratorList[k];
-                        
-                        if (parent._table.renderList[i].publicSID == item.publicSID) {
-                            
-                            if (parent._table.renderList[i].isMod == false) {
-                                if ($debug) Debug.info("updateIcons Found RR ",i,item.publicSID);
-                                parent._table.renderList[i].isMod = true;
-                                
-                                var itemView = this.getItemByPublicSID(item.publicSID);
-                                if (itemView != null) {
-                                    itemView.setAttribute("isMod",true);
-                                    itemView.updateModeratorIcons();
-                                }
-                            }
-                            
-                        }
-                        
-                    }
-                    
-                    for (var k=0;k<canvas.removeModeratorList.length;k++) {
-                        
-                        var item = canvas.removeModeratorList[k];
-                        
-                        if (parent._table.renderList[i].publicSID == item.publicSID) {
-                            
-                            if (parent._table.renderList[i].isMod == true) {
-                               if ($debug) Debug.info("RE updateIcons Found RR ",i,item.publicSID);
-                               parent._table.renderList[i].isMod = false;
-                            
-                               var itemView = this.getItemByPublicSID(item.publicSID);
-                               if (itemView != null) {
-                                   itemView.setAttribute("isMod",false);
-                                   itemView.updateModeratorIcons();
-                               }
-                            }
-                            
-                        }
-                        
-                    }
-                
-                }
-                
-                if (parent._applyAndStatusIcons != null) {
-                	parent._applyAndStatusIcons.updateIcons();
-                }
-            ]]>
-        </method>
+		<handler name="onexclusiveAudioAllowStatus" reference="canvas" args="rclObject">
+			updateIcons(rclObject);
+		</handler>
+        
+		<handler name="onlastBroadCastingUser" reference="canvas" args="userObject">
+		<![CDATA[
+			if ($debug) Debug.write(" :: onlastBroadCastingUser :: ");
+			if (!userObject.isBroadcasting) {
+				//Stop Broadcasting and close Dialog
+				//Search, stop and remove video
+				parent.parent.removeVideoByUser(userObject);
+			}
+			updateIcons(userObject);
+		]]>
+		</handler>
+        
+		<method name="updateIcons" args="userObject">
+		<![CDATA[
+			if ($debug) Debug.write(" :: ondrawAllowStatus :: ", userObject.canDraw);
+			
+			var vList = parent._table.renderList;
+			for (var i = 0; i < vList.length; ++i) {
+				if (vList[i].publicSID == userObject.publicSID) {
+					if ($debug) Debug.write(" :: ondrawAllowStatus :: item1 found: ", vList[i]);
+					vList[i].isBroadcasting = userObject.isBroadcasting;
+					vList[i].canDraw = userObject.canDraw;
+					vList[i].canShare = userObject.canShare;
+					vList[i].canRemote = userObject.canRemote;
+					vList[i].canGiveAudio = userObject.canGiveAudio;
+					vList[i].micMuted = userObject.micMuted;
+					break;
+				}
+			}
+			
+			//search for the user and update its drawStatusIcon
+			var vList = parent._table._innerlist._inn._inn.subviews;
+			for (var i = 0; i < vList.length; ++i) {
+				if (vList[i].refObj.publicSID == userObject.publicSID) {
+					if ($debug) Debug.write(" :: ondrawAllowStatus :: item2 found: ", vList[i]);
+					vList[i].refObj.isBroadcasting = userObject.isBroadcasting;
+					vList[i].isBroadcasting = userObject.isBroadcasting;
+					vList[i].refObj.canDraw = userObject.canDraw;
+					vList[i].canDraw = userObject.canDraw;
+					vList[i].refObj.canShare = userObject.canShare;
+					vList[i].canShare = userObject.canShare;
+					vList[i].refObj.canRemote = userObject.canRemote;
+					vList[i].canRemote = userObject.canRemote;
+					vList[i].refObj.canGiveAudio = userObject.canGiveAudio;
+					vList[i].canGiveAudio = userObject.canGiveAudio;
+					vList[i].refObj.micMuted = userObject.micMuted;
+					vList[i].micMuted = userObject.micMuted;
+					vList[i].updateIconByModScroll();
+					vList[i].updateModeratorIcons();
+					break;
+				}
+			}
+			
+			if (parent._applyAndStatusIcons != null) {
+				parent._applyAndStatusIcons.updateIcons();
+			}
+		]]>
+		</method>
         
         <method name="getItemByPublicSID" args="publicSID">
             <![CDATA[

Modified: openmeetings/branches/3.0.x/WebContent/swf10/commonVideoViewContentSWF10.lzx
URL: http://svn.apache.org/viewvc/openmeetings/branches/3.0.x/WebContent/swf10/commonVideoViewContentSWF10.lzx?rev=1705864&r1=1705863&r2=1705864&view=diff
==============================================================================
--- openmeetings/branches/3.0.x/WebContent/swf10/commonVideoViewContentSWF10.lzx (original)
+++ openmeetings/branches/3.0.x/WebContent/swf10/commonVideoViewContentSWF10.lzx Tue Sep 29 13:49:55 2015
@@ -87,7 +87,7 @@
 	</method>
     
 	<method name="createEditRecordStream" args="syncUpdate,isInterview,interviewPodId">
-		if($debug) Debug.info("createEditRecordStream,",syncUpdate,isInterview,interviewPodId);
+		if($debug) Debug.info("createEditRecordStream,", syncUpdate, isInterview, interviewPodId, canvas.userobject);
 		if (canvas.inner.editRecordStream != null)
 			canvas.inner.editRecordStream.destroy();
 			new lz.editRecordStreamSWF10(canvas.inner, {
@@ -304,23 +304,17 @@
         ]]>
     </method>
 
-    <method name="disconnectclient" args="publicSID">
-        <![CDATA[
-            if ($debug) Debug.write("disconnectclient: ",publicSID);
-
-            var obj = this.getVideoObjectByPublicSID(publicSID);
-
-            //if ($debug) Debug.write("disconnecclient obj: ",obj);
-            if (obj == null) {
-            	if ($debug) Debug.warn("Could Not find this To disconnect",publicSID);
-            }
-
-            if (obj != null){
-                obj.resetValues();
-                obj.destroy();
-            }
-        ]]>
-    </method>
+	<method name="disconnectclient" args="publicSID">
+	<![CDATA[
+		if ($debug) Debug.write("disconnectclient: ", publicSID);
+		var obj = closeStreamclient(publicSID);
+		if (obj == null) {
+			if ($debug) Debug.warn("Could Not find this To disconnect",publicSID);
+		} else {
+			obj.destroy();
+		}
+	]]>
+	</method>
 
     <method name="muteSound" args="publicSID, bool">
         <![CDATA[
@@ -339,17 +333,22 @@
         return;
     </method>
 
-    <method name="closeStreamclient" args="publicSID">
-        <![CDATA[
-            if ($debug) Debug.write("closeStreamthis: ",publicSID);
-            var obj = this.getVideoObjectByPublicSID(publicSID);
-            if ($debug) Debug.write("closeStreamthis obj: ",obj);
-            if (obj != null){
-                obj.resetValues();
-            }
-            return obj;
-        ]]>
-    </method>
+	<method name="closeStreamclient" args="publicSID">
+	<![CDATA[
+		if ($debug) Debug.write("closeStreamthis: ", publicSID);
+		var obj = this.getVideoObjectByPublicSID(publicSID);
+		if ($debug) Debug.write("closeStreamthis obj: ", obj);
+		if (obj != null) {
+			obj.resetValues();
+		}
+		if (canvas.publicSID == publicSID && canvas.inner.editRecordStream != null) {
+			canvas.inner.editRecordStream.cleanVideos();
+			canvas.inner.editRecordStream.destroy();
+			canvas.inner.editRecordStream = null;
+		}
+		return obj;
+	]]>
+	</method>
 
     <method name="removeVideoByUser" args="publicSID"><![CDATA[
         var obj = this.closeStreamclient(publicSID);

Modified: openmeetings/branches/3.0.x/src/main/java/org/apache/openmeetings/remote/WhiteBoardService.java
URL: http://svn.apache.org/viewvc/openmeetings/branches/3.0.x/src/main/java/org/apache/openmeetings/remote/WhiteBoardService.java?rev=1705864&r1=1705863&r2=1705864&view=diff
==============================================================================
--- openmeetings/branches/3.0.x/src/main/java/org/apache/openmeetings/remote/WhiteBoardService.java (original)
+++ openmeetings/branches/3.0.x/src/main/java/org/apache/openmeetings/remote/WhiteBoardService.java Tue Sep 29 13:49:55 2015
@@ -188,31 +188,25 @@ public class WhiteBoardService implement
 	 */
 	public Boolean setCanDraw(String SID, String publicSID, boolean canDraw) {
 		try {
-
 			IConnection current = Red5.getConnectionLocal();
 			String streamid = current.getClient().getId();
-			Client currentClient = this.sessionManager
-					.getClientByStreamId(streamid, null);
+			Client currentClient = sessionManager.getClientByStreamId(streamid, null);
 
 			Long users_id = sessiondataDao.checkSession(SID);
 
 			if (AuthLevelUtil.hasUserLevel(userDao.getRights(users_id))) {
 
 				if (currentClient.getIsMod()) {
-					Client rcl = this.sessionManager
-							.getClientByPublicSID(publicSID, false, null);
+					Client rcl = sessionManager.getClientByPublicSID(publicSID, false, null);
 
 					if (rcl != null) {
 						rcl.setCanDraw(canDraw);
-						this.sessionManager.updateClientByStreamId(
-								rcl.getStreamid(), rcl, false, null);
+						sessionManager.updateClientByStreamId(rcl.getStreamid(), rcl, false, null);
 
 						HashMap<Integer, Object> newMessage = new HashMap<Integer, Object>();
 						newMessage.put(0, "updateDrawStatus");
 						newMessage.put(1, rcl);
-						this.scopeApplicationAdapter
-								.sendMessageWithClientWithSyncObject(newMessage, true);
-
+						scopeApplicationAdapter.sendMessageWithClientWithSyncObject(newMessage, true);
 					} else {
 						return false;
 					}
@@ -220,7 +214,6 @@ public class WhiteBoardService implement
 					return false;
 				}
 			}
-
 		} catch (Exception err) {
 			log.error("[setCanDraw]", err);
 		}
@@ -229,31 +222,24 @@ public class WhiteBoardService implement
 
 	public Boolean setCanShare(String SID, String publicSID, boolean canShare) {
 		try {
-
 			IConnection current = Red5.getConnectionLocal();
 			String streamid = current.getClient().getId();
-			Client currentClient = this.sessionManager
-					.getClientByStreamId(streamid, null);
+			Client currentClient = sessionManager.getClientByStreamId(streamid, null);
 
 			Long users_id = sessiondataDao.checkSession(SID);
 
 			if (AuthLevelUtil.hasUserLevel(userDao.getRights(users_id))) {
-
 				if (currentClient.getIsMod()) {
-					Client rcl = this.sessionManager
-							.getClientByPublicSID(publicSID, false, null);
+					Client rcl = sessionManager.getClientByPublicSID(publicSID, false, null);
 
 					if (rcl != null) {
 						rcl.setCanShare(canShare);
-						this.sessionManager.updateClientByStreamId(
-								rcl.getStreamid(), rcl, false, null);
+						sessionManager.updateClientByStreamId(rcl.getStreamid(), rcl, false, null);
 
 						HashMap<Integer, Object> newMessage = new HashMap<Integer, Object>();
 						newMessage.put(0, "updateDrawStatus");
 						newMessage.put(1, rcl);
-						this.scopeApplicationAdapter
-								.sendMessageWithClientWithSyncObject(newMessage, true);
-
+						scopeApplicationAdapter.sendMessageWithClientWithSyncObject(newMessage, true);
 					} else {
 						return false;
 					}
@@ -261,9 +247,8 @@ public class WhiteBoardService implement
 					return false;
 				}
 			}
-
 		} catch (Exception err) {
-			log.error("[setCanDraw]", err);
+			log.error("[setCanShare]", err);
 		}
 		return null;
 	}

Modified: openmeetings/trunk/singlewebapp/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/WhiteBoardService.java
URL: http://svn.apache.org/viewvc/openmeetings/trunk/singlewebapp/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/WhiteBoardService.java?rev=1705864&r1=1705863&r2=1705864&view=diff
==============================================================================
--- openmeetings/trunk/singlewebapp/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/WhiteBoardService.java (original)
+++ openmeetings/trunk/singlewebapp/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/WhiteBoardService.java Tue Sep 29 13:49:55 2015
@@ -188,31 +188,25 @@ public class WhiteBoardService implement
 	 */
 	public Boolean setCanDraw(String SID, String publicSID, boolean canDraw) {
 		try {
-
 			IConnection current = Red5.getConnectionLocal();
 			String streamid = current.getClient().getId();
-			Client currentClient = this.sessionManager
-					.getClientByStreamId(streamid, null);
+			Client currentClient = sessionManager.getClientByStreamId(streamid, null);
 
 			Long users_id = sessiondataDao.checkSession(SID);
 
 			if (AuthLevelUtil.hasUserLevel(userDao.getRights(users_id))) {
 
 				if (currentClient.getIsMod()) {
-					Client rcl = this.sessionManager
-							.getClientByPublicSID(publicSID, false, null);
+					Client rcl = sessionManager.getClientByPublicSID(publicSID, false, null);
 
 					if (rcl != null) {
 						rcl.setCanDraw(canDraw);
-						this.sessionManager.updateClientByStreamId(
-								rcl.getStreamid(), rcl, false, null);
+						sessionManager.updateClientByStreamId(rcl.getStreamid(), rcl, false, null);
 
 						HashMap<Integer, Object> newMessage = new HashMap<Integer, Object>();
 						newMessage.put(0, "updateDrawStatus");
 						newMessage.put(1, rcl);
-						this.scopeApplicationAdapter
-								.sendMessageWithClientWithSyncObject(newMessage, true);
-
+						scopeApplicationAdapter.sendMessageWithClientWithSyncObject(newMessage, true);
 					} else {
 						return false;
 					}
@@ -220,7 +214,6 @@ public class WhiteBoardService implement
 					return false;
 				}
 			}
-
 		} catch (Exception err) {
 			log.error("[setCanDraw]", err);
 		}
@@ -229,31 +222,24 @@ public class WhiteBoardService implement
 
 	public Boolean setCanShare(String SID, String publicSID, boolean canShare) {
 		try {
-
 			IConnection current = Red5.getConnectionLocal();
 			String streamid = current.getClient().getId();
-			Client currentClient = this.sessionManager
-					.getClientByStreamId(streamid, null);
+			Client currentClient = sessionManager.getClientByStreamId(streamid, null);
 
 			Long users_id = sessiondataDao.checkSession(SID);
 
 			if (AuthLevelUtil.hasUserLevel(userDao.getRights(users_id))) {
-
 				if (currentClient.getIsMod()) {
-					Client rcl = this.sessionManager
-							.getClientByPublicSID(publicSID, false, null);
+					Client rcl = sessionManager.getClientByPublicSID(publicSID, false, null);
 
 					if (rcl != null) {
 						rcl.setCanShare(canShare);
-						this.sessionManager.updateClientByStreamId(
-								rcl.getStreamid(), rcl, false, null);
+						sessionManager.updateClientByStreamId(rcl.getStreamid(), rcl, false, null);
 
 						HashMap<Integer, Object> newMessage = new HashMap<Integer, Object>();
 						newMessage.put(0, "updateDrawStatus");
 						newMessage.put(1, rcl);
-						this.scopeApplicationAdapter
-								.sendMessageWithClientWithSyncObject(newMessage, true);
-
+						scopeApplicationAdapter.sendMessageWithClientWithSyncObject(newMessage, true);
 					} else {
 						return false;
 					}
@@ -261,9 +247,8 @@ public class WhiteBoardService implement
 					return false;
 				}
 			}
-
 		} catch (Exception err) {
-			log.error("[setCanDraw]", err);
+			log.error("[setCanShare]", err);
 		}
 		return null;
 	}