Merge pull request #1578 from ONLYOFFICE/fix/bugfix
[Mobile] Handle permissions.userInfoGroups: hide cursors from users n…
This commit is contained in:
commit
dc15c38338
|
@ -163,6 +163,8 @@ class ContextMenuController extends Component {
|
|||
}
|
||||
|
||||
onApiShowForeignCursorLabel(UserId, X, Y, color) {
|
||||
if (!this.isUserVisible(UserId)) return;
|
||||
|
||||
/** coauthoring begin **/
|
||||
const tipHeight = 20;
|
||||
|
||||
|
|
|
@ -29,6 +29,7 @@ class ContextMenu extends ContextMenuController {
|
|||
this.onApiHideComment = this.onApiHideComment.bind(this);
|
||||
this.onApiShowChange = this.onApiShowChange.bind(this);
|
||||
this.getUserName = this.getUserName.bind(this);
|
||||
this.isUserVisible = this.isUserVisible.bind(this);
|
||||
this.ShowModal = this.ShowModal.bind(this);
|
||||
}
|
||||
|
||||
|
@ -41,6 +42,11 @@ class ContextMenu extends ContextMenuController {
|
|||
return AscCommon.UserInfoParser.getParsedName(user.asc_getUserName());
|
||||
}
|
||||
|
||||
isUserVisible(id) {
|
||||
const user = this.props.users.searchUserByCurrentId(id);
|
||||
return user ? (user.asc_getIdOriginal()===this.props.users.currentUser.asc_getIdOriginal() || AscCommon.UserInfoParser.isUserVisible(user.asc_getUserName())) : true;
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
super.componentWillUnmount();
|
||||
|
||||
|
|
|
@ -25,6 +25,7 @@ class ContextMenu extends ContextMenuController {
|
|||
this.onApiShowComment = this.onApiShowComment.bind(this);
|
||||
this.onApiHideComment = this.onApiHideComment.bind(this);
|
||||
this.getUserName = this.getUserName.bind(this);
|
||||
this.isUserVisible = this.isUserVisible.bind(this);
|
||||
}
|
||||
|
||||
static closeContextMenu() {
|
||||
|
@ -36,6 +37,11 @@ class ContextMenu extends ContextMenuController {
|
|||
return AscCommon.UserInfoParser.getParsedName(user.asc_getUserName());
|
||||
}
|
||||
|
||||
isUserVisible(id) {
|
||||
const user = this.props.users.searchUserByCurrentId(id);
|
||||
return user ? (user.asc_getIdOriginal()===this.props.users.currentUser.asc_getIdOriginal() || AscCommon.UserInfoParser.isUserVisible(user.asc_getUserName())) : true;
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
super.componentWillUnmount();
|
||||
|
||||
|
|
|
@ -30,6 +30,7 @@ class ContextMenu extends ContextMenuController {
|
|||
this.isOpenWindowUser = false;
|
||||
this.timer;
|
||||
this.getUserName = this.getUserName.bind(this);
|
||||
this.isUserVisible = this.isUserVisible.bind(this);
|
||||
this.onApiMouseMove = this.onApiMouseMove.bind(this);
|
||||
this.onApiHyperlinkClick = this.onApiHyperlinkClick.bind(this);
|
||||
}
|
||||
|
@ -43,6 +44,11 @@ class ContextMenu extends ContextMenuController {
|
|||
return AscCommon.UserInfoParser.getParsedName(user.asc_getUserName());
|
||||
}
|
||||
|
||||
isUserVisible(id) {
|
||||
const user = this.props.users.searchUserByCurrentId(id);
|
||||
return user ? (user.asc_getIdOriginal()===this.props.users.currentUser.asc_getIdOriginal() || AscCommon.UserInfoParser.isUserVisible(user.asc_getUserName())) : true;
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
super.componentWillUnmount();
|
||||
|
||||
|
@ -277,7 +283,7 @@ class ContextMenu extends ContextMenuController {
|
|||
$$('.username-tip').remove();
|
||||
}
|
||||
|
||||
if (index_locked ) {
|
||||
if (index_locked && this.isUserVisible(dataarray[index_locked-1].asc_getUserId())) {
|
||||
const tipHeight = 20;
|
||||
let editorOffset = $$("#editor_sdk").offset(),
|
||||
XY = [ editorOffset.left - $(window).scrollLeft(), editorOffset.top - $(window).scrollTop()],
|
||||
|
|
Loading…
Reference in a new issue