mirror of
https://github.com/ONLYOFFICE/document-server-integration.git
synced 2026-04-07 14:06:11 +08:00
nodejs: commentGroups
This commit is contained in:
@ -20,18 +20,21 @@ var descr_user_1 = [
|
||||
"File author by default",
|
||||
"He doesn’t belong to any of the groups",
|
||||
"He can review all the changes",
|
||||
"He can do everything with comments",
|
||||
"The file favorite state is undefined"
|
||||
];
|
||||
|
||||
var descr_user_2 = [
|
||||
"He belongs to Group2",
|
||||
"He can review only his own changes or the changes made by the users who don’t belong to any of the groups",
|
||||
"He can view, edit and delete only his comments and the comments left by the users who don't belong to any of the groups",
|
||||
"This file is favorite"
|
||||
];
|
||||
|
||||
var descr_user_3 = [
|
||||
"He belongs to Group3",
|
||||
"He can review only the changes made by the users from Group2",
|
||||
"He can view, edit and delete only his comments and the comments left by the users from Group2",
|
||||
"This file isn’t favorite",
|
||||
"He can’t copy data from the file into the clipboard",
|
||||
"He can’t download the file",
|
||||
@ -42,23 +45,41 @@ var descr_user_0 = [
|
||||
"The user without a name. The name is requested upon the editor opening",
|
||||
"He doesn’t belong to any of the groups",
|
||||
"He can review all the changes",
|
||||
"He can view only his comments",
|
||||
"The file favorite state is undefined",
|
||||
"He cannot mention others in the comments"
|
||||
];
|
||||
|
||||
var users = [
|
||||
new User("uid-1", "John Smith", "smith@mail.ru", null, null, null, [], descr_user_1),
|
||||
new User("uid-2", "Mark Pottato", "pottato@mail.ru", "group-2", ["group-2", ""], true, [], descr_user_2), // own and without group
|
||||
new User("uid-3", "Hamish Mitchell", "mitchell@mail.ru", "group-3", ["group-2"], false, ["copy", "download", "print"], descr_user_3), // other group only
|
||||
new User("uid-0", null, null, null, null, null, [], descr_user_0),
|
||||
new User("uid-1", "John Smith", "smith@mail.ru",
|
||||
null, null, {},
|
||||
null, [], descr_user_1),
|
||||
new User("uid-2", "Mark Pottato", "pottato@mail.ru",
|
||||
"group-2", ["group-2", ""], {
|
||||
view: ["group-2", ""],
|
||||
edit: ["group-2", ""],
|
||||
remove: ["group-2", ""]
|
||||
},
|
||||
true, [], descr_user_2), // own and without group
|
||||
new User("uid-3", "Hamish Mitchell", "mitchell@mail.ru",
|
||||
"group-3", ["group-2"], {
|
||||
view: ["group-3", "group-2"],
|
||||
edit: ["group-2"],
|
||||
remove: ["group-2"]
|
||||
},
|
||||
false, ["copy", "download", "print"], descr_user_3), // other group only
|
||||
new User("uid-0", null, null,
|
||||
null, null, {},
|
||||
null, [], descr_user_0),
|
||||
];
|
||||
|
||||
function User(id, name, email, group, reviewGroups, favorite, deniedPermissions, descriptions) {
|
||||
function User(id, name, email, group, reviewGroups, commentGroups, favorite, deniedPermissions, descriptions) {
|
||||
this.id = id;
|
||||
this.name = name;
|
||||
this.email = email;
|
||||
this.group = group;
|
||||
this.reviewGroups = reviewGroups;
|
||||
this.commentGroups = commentGroups;
|
||||
this.favorite = favorite;
|
||||
this.deniedPermissions = deniedPermissions;
|
||||
this.descriptions = descriptions;
|
||||
|
||||
Reference in New Issue
Block a user