permissions.userInfo->permissions.userInfoGroups

This commit is contained in:
Julia Radzhabova 2022-02-09 18:14:19 +03:00
parent 82fec34f74
commit ac1dcce854
7 changed files with 13 additions and 13 deletions
apps
api/documents
documenteditor
main/app/controller
mobile/src/store
presentationeditor
main/app/controller
mobile/src/store
spreadsheeteditor
main/app/controller
mobile/src/store

View file

@ -56,7 +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
userInfoGroups: ["Group1", ""], // show tooltips/cursors/info in header only for users in userInfoGroups 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
}
},

View file

@ -1481,12 +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;
this.appOptions.canUseUserInfoPermissions = this.appOptions.canLicense && !!this.permissions.userInfoGroups;
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.appOptions.canUseUserInfoPermissions && AscCommon.UserInfoParser.setUserInfoPermissions(this.permissions.userInfoGroups);
appHeader.setUserName(AscCommon.UserInfoParser.getParsedName(AscCommon.UserInfoParser.getCurrentName()));
this.appOptions.canRename && appHeader.setCanRename(true);

View file

@ -141,10 +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.canUseUserInfoPermissions = this.canLicense && !!permissions.userInfoGroups;
this.canUseReviewPermissions && AscCommon.UserInfoParser.setReviewPermissions(permissions.reviewGroups, this.customization.reviewPermissions);
this.canUseCommentPermissions && AscCommon.UserInfoParser.setCommentPermissions(permissions.commentGroups);
this.canUseUserInfoPermissions && AscCommon.UserInfoParser.setUserInfoPermissions(permissions.userInfo);
this.canUseUserInfoPermissions && AscCommon.UserInfoParser.setUserInfoPermissions(permissions.userInfoGroups);
}
setCanViewReview (value) {
this.canViewReview = value;

View file

@ -1153,12 +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;
this.appOptions.canUseUserInfoPermissions = this.appOptions.canLicense && !!this.permissions.userInfoGroups;
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.appOptions.canUseUserInfoPermissions && AscCommon.UserInfoParser.setUserInfoPermissions(this.permissions.userInfoGroups);
appHeader.setUserName(AscCommon.UserInfoParser.getParsedName(AscCommon.UserInfoParser.getCurrentName()));
this.appOptions.canRename && appHeader.setCanRename(true);

View file

@ -112,9 +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.canUseUserInfoPermissions = this.canLicense && !!permissions.userInfoGroups;
this.canUseReviewPermissions && AscCommon.UserInfoParser.setReviewPermissions(permissions.reviewGroups, this.customization.reviewPermissions);
this.canUseCommentPermissions && AscCommon.UserInfoParser.setCommentPermissions(permissions.commentGroups);
this.canUseUserInfoPermissions && AscCommon.UserInfoParser.setUserInfoPermissions(permissions.userInfo);
this.canUseUserInfoPermissions && AscCommon.UserInfoParser.setUserInfoPermissions(permissions.userInfoGroups);
}
}

View file

@ -1230,12 +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;
this.appOptions.canUseUserInfoPermissions = this.appOptions.canLicense && !!this.permissions.userInfoGroups;
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.appOptions.canUseUserInfoPermissions && AscCommon.UserInfoParser.setUserInfoPermissions(this.permissions.userInfoGroups);
this.headerView.setUserName(AscCommon.UserInfoParser.getParsedName(AscCommon.UserInfoParser.getCurrentName()));
} else
this.appOptions.canModifyFilter = true;

View file

@ -107,9 +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.canUseUserInfoPermissions = this.canLicense && !!permissions.userInfoGroups;
this.canUseReviewPermissions && AscCommon.UserInfoParser.setReviewPermissions(permissions.reviewGroups, this.customization.reviewPermissions);
this.canUseCommentPermissions && AscCommon.UserInfoParser.setCommentPermissions(permissions.commentGroups);
this.canUseUserInfoPermissions && AscCommon.UserInfoParser.setUserInfoPermissions(permissions.userInfo);
this.canUseUserInfoPermissions && AscCommon.UserInfoParser.setUserInfoPermissions(permissions.userInfoGroups);
}
}