Add userInfo permissions: hide users not in permissions.userInfo groups
This commit is contained in:
parent
2c6fd0f3ca
commit
82fec34f74
|
@ -56,6 +56,7 @@
|
|||
edit: ["Group1", ""] // current user can edit comments made by users from Group1 and users without a group.
|
||||
remove: ["Group1", ""] // current user can remove comments made by users from Group1 and users without a group.
|
||||
},
|
||||
userInfo: ["Group1", ""], // show tooltips/cursors/info in header only for users in userInfo groups. [""] - means users without group, [] - don't show any users, null/undefined/"" - show all users
|
||||
protect: <can protect document> // default = true. show/hide protect tab or protect buttons
|
||||
}
|
||||
},
|
||||
|
|
|
@ -1481,10 +1481,12 @@ define([
|
|||
this.appOptions.canUseReviewPermissions = this.appOptions.canLicense && (!!this.permissions.reviewGroups ||
|
||||
this.editorConfig.customization && this.editorConfig.customization.reviewPermissions && (typeof (this.editorConfig.customization.reviewPermissions) == 'object'));
|
||||
this.appOptions.canUseCommentPermissions = this.appOptions.canLicense && !!this.permissions.commentGroups;
|
||||
this.appOptions.canUseUserInfoPermissions = this.appOptions.canLicense && !!this.permissions.userInfo;
|
||||
AscCommon.UserInfoParser.setParser(true);
|
||||
AscCommon.UserInfoParser.setCurrentName(this.appOptions.user.fullname);
|
||||
this.appOptions.canUseReviewPermissions && AscCommon.UserInfoParser.setReviewPermissions(this.permissions.reviewGroups, this.editorConfig.customization.reviewPermissions);
|
||||
this.appOptions.canUseCommentPermissions && AscCommon.UserInfoParser.setCommentPermissions(this.permissions.commentGroups);
|
||||
this.appOptions.canUseUserInfoPermissions && AscCommon.UserInfoParser.setUserInfoPermissions(this.permissions.userInfo);
|
||||
appHeader.setUserName(AscCommon.UserInfoParser.getParsedName(AscCommon.UserInfoParser.getCurrentName()));
|
||||
|
||||
this.appOptions.canRename && appHeader.setCanRename(true);
|
||||
|
|
|
@ -141,8 +141,10 @@ export class storeAppOptions {
|
|||
this.canUseReviewPermissions = this.canLicense && (!!permissions.reviewGroups || this.customization
|
||||
&& this.customization.reviewPermissions && (typeof (this.customization.reviewPermissions) == 'object'));
|
||||
this.canUseCommentPermissions = this.canLicense && !!permissions.commentGroups;
|
||||
this.canUseUserInfoPermissions = this.canLicense && !!permissions.userInfo;
|
||||
this.canUseReviewPermissions && AscCommon.UserInfoParser.setReviewPermissions(permissions.reviewGroups, this.customization.reviewPermissions);
|
||||
this.canUseCommentPermissions && AscCommon.UserInfoParser.setCommentPermissions(permissions.commentGroups);
|
||||
this.canUseUserInfoPermissions && AscCommon.UserInfoParser.setUserInfoPermissions(permissions.userInfo);
|
||||
}
|
||||
setCanViewReview (value) {
|
||||
this.canViewReview = value;
|
||||
|
|
|
@ -1153,10 +1153,12 @@ define([
|
|||
this.appOptions.canUseReviewPermissions = this.appOptions.canLicense && (!!this.permissions.reviewGroups ||
|
||||
this.appOptions.canLicense && this.editorConfig.customization && this.editorConfig.customization.reviewPermissions && (typeof (this.editorConfig.customization.reviewPermissions) == 'object'));
|
||||
this.appOptions.canUseCommentPermissions = this.appOptions.canLicense && !!this.permissions.commentGroups;
|
||||
this.appOptions.canUseUserInfoPermissions = this.appOptions.canLicense && !!this.permissions.userInfo;
|
||||
AscCommon.UserInfoParser.setParser(true);
|
||||
AscCommon.UserInfoParser.setCurrentName(this.appOptions.user.fullname);
|
||||
this.appOptions.canUseReviewPermissions && AscCommon.UserInfoParser.setReviewPermissions(this.permissions.reviewGroups, this.editorConfig.customization.reviewPermissions);
|
||||
this.appOptions.canUseCommentPermissions && AscCommon.UserInfoParser.setCommentPermissions(this.permissions.commentGroups);
|
||||
this.appOptions.canUseUserInfoPermissions && AscCommon.UserInfoParser.setUserInfoPermissions(this.permissions.userInfo);
|
||||
appHeader.setUserName(AscCommon.UserInfoParser.getParsedName(AscCommon.UserInfoParser.getCurrentName()));
|
||||
|
||||
this.appOptions.canRename && appHeader.setCanRename(true);
|
||||
|
|
|
@ -112,7 +112,9 @@ export class storeAppOptions {
|
|||
this.canUseReviewPermissions = this.canLicense && (!!permissions.reviewGroups || this.customization
|
||||
&& this.customization.reviewPermissions && (typeof (this.customization.reviewPermissions) == 'object'));
|
||||
this.canUseCommentPermissions = this.canLicense && !!permissions.commentGroups;
|
||||
this.canUseUserInfoPermissions = this.canLicense && !!permissions.userInfo;
|
||||
this.canUseReviewPermissions && AscCommon.UserInfoParser.setReviewPermissions(permissions.reviewGroups, this.customization.reviewPermissions);
|
||||
this.canUseCommentPermissions && AscCommon.UserInfoParser.setCommentPermissions(permissions.commentGroups);
|
||||
this.canUseUserInfoPermissions && AscCommon.UserInfoParser.setUserInfoPermissions(permissions.userInfo);
|
||||
}
|
||||
}
|
|
@ -1230,10 +1230,12 @@ define([
|
|||
this.appOptions.canUseReviewPermissions = this.appOptions.canLicense && (!!this.permissions.reviewGroups ||
|
||||
this.appOptions.canLicense && this.editorConfig.customization && this.editorConfig.customization.reviewPermissions && (typeof (this.editorConfig.customization.reviewPermissions) == 'object'));
|
||||
this.appOptions.canUseCommentPermissions = this.appOptions.canLicense && !!this.permissions.commentGroups;
|
||||
this.appOptions.canUseUserInfoPermissions = this.appOptions.canLicense && !!this.permissions.userInfo;
|
||||
AscCommon.UserInfoParser.setParser(true);
|
||||
AscCommon.UserInfoParser.setCurrentName(this.appOptions.user.fullname);
|
||||
this.appOptions.canUseReviewPermissions && AscCommon.UserInfoParser.setReviewPermissions(this.permissions.reviewGroups, this.editorConfig.customization.reviewPermissions);
|
||||
this.appOptions.canUseCommentPermissions && AscCommon.UserInfoParser.setCommentPermissions(this.permissions.commentGroups);
|
||||
this.appOptions.canUseUserInfoPermissions && AscCommon.UserInfoParser.setUserInfoPermissions(this.permissions.userInfo);
|
||||
this.headerView.setUserName(AscCommon.UserInfoParser.getParsedName(AscCommon.UserInfoParser.getCurrentName()));
|
||||
} else
|
||||
this.appOptions.canModifyFilter = true;
|
||||
|
|
|
@ -107,7 +107,9 @@ export class storeAppOptions {
|
|||
this.canUseReviewPermissions = this.canLicense && (!!permissions.reviewGroups || this.customization
|
||||
&& this.customization.reviewPermissions && (typeof (this.customization.reviewPermissions) == 'object'));
|
||||
this.canUseCommentPermissions = this.canLicense && !!permissions.commentGroups;
|
||||
this.canUseUserInfoPermissions = this.canLicense && !!permissions.userInfo;
|
||||
this.canUseReviewPermissions && AscCommon.UserInfoParser.setReviewPermissions(permissions.reviewGroups, this.customization.reviewPermissions);
|
||||
this.canUseCommentPermissions && AscCommon.UserInfoParser.setCommentPermissions(permissions.commentGroups);
|
||||
this.canUseUserInfoPermissions && AscCommon.UserInfoParser.setUserInfoPermissions(permissions.userInfo);
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue