Merge remote-tracking branch 'remotes/origin/develop' into feature/jwtHistoryFiles

# Conflicts:
#	web/documentserver-example/java/README.md
This commit is contained in:
Sergey Linnik
2022-02-11 10:22:04 +03:00
74 changed files with 268 additions and 186 deletions

View File

@ -267,6 +267,7 @@ public class FileModel
public Boolean review;
public List<String> reviewGroups;
public CommentGroups commentGroups;
public List<String> userInfoGroups;
// defines what can be done with a document
public Permissions(String mode, String type, Boolean canEdit, User user)
@ -282,6 +283,7 @@ public class FileModel
review = canEdit && (mode.equals("edit") || mode.equals("review"));
reviewGroups = user.reviewGroups;
commentGroups = user.commentGroups;
userInfoGroups = user.userInfoGroups;
}
}

View File

@ -31,8 +31,9 @@ public class User {
public List<String> deniedPermissions;
public List<String> descriptions;
public Boolean templates;
public List<String> userInfoGroups;
public User(String id, String name, String email, String group, List<String> reviewGroups, CommentGroups commentGroups,
public User(String id, String name, String email, String group, List<String> reviewGroups, CommentGroups commentGroups, List<String> userInfoGroups,
Boolean favorite, List<String> deniedPermissions, List<String> descriptions, Boolean templates) {
this.id = id;
this.name = name;
@ -44,5 +45,6 @@ public class User {
this.deniedPermissions = deniedPermissions;
this.descriptions = descriptions;
this.templates = templates;
this.userInfoGroups = userInfoGroups;
}
}

View File

@ -63,7 +63,7 @@ public class FileUtility
// spreadsheet extensions
public static List<String> ExtsSpreadsheet = Arrays.asList
(
".xls", ".xlsx", ".xlsm",
".xls", ".xlsx", ".xlsm", ".xlsb",
".xlt", ".xltx", ".xltm",
".ods", ".fods", ".ots", ".csv"
);

View File

@ -31,6 +31,7 @@ public class Users {
add("Can perform all actions with comments");
add("The file favorite state is undefined");
add("Can create files from templates using data from the editor");
add("Can see the information about all users");
}};
static List<String> descr_user_2 = new ArrayList<String>() {{
@ -39,6 +40,7 @@ public class Users {
add("Can view comments, edit his own comments and comments left by users with no group. Can remove his own comments only");
add("This file is marked as favorite");
add("Can create new files from the editor");
add("Can see the information about users from Group2 and users who dont belong to any group");
}};
static List<String> descr_user_3 = new ArrayList<String>() {{
@ -50,6 +52,7 @@ public class Users {
add("Cant download the file");
add("Cant print the file");
add("Can create new files from the editor");
add("Can see the information about Group2 users");
}};
static List<String> descr_user_0 = new ArrayList<String>() {{
@ -60,20 +63,21 @@ public class Users {
add("The file favorite state is undefined");
add("Can't mention others in comments");
add("Can't create new files from the editor");
add("Cant see anyones information");
}};
private static List<User> users = new ArrayList<User>() {{
add(new User("uid-1", "John Smith", "smith@example.com",
"", null, new CommentGroups(),
"", null, new CommentGroups(), null,
null, new ArrayList<String>(), descr_user_1, true));
add(new User("uid-2", "Mark Pottato", "pottato@example.com",
"group-2", Arrays.asList("group-2", ""), new CommentGroups(null, Arrays.asList("group-2", ""), Arrays.asList("group-2")),
"group-2", Arrays.asList("group-2", ""), new CommentGroups(null, Arrays.asList("group-2", ""), Arrays.asList("group-2")), Arrays.asList("group-2", ""),
true, new ArrayList<String>(), descr_user_2, false));
add(new User("uid-3", "Hamish Mitchell", "mitchell@example.com",
"group-3", Arrays.asList("group-2"), new CommentGroups(Arrays.asList("group-3", "group-2"), Arrays.asList("group-2"), new ArrayList<String>()),
"group-3", Arrays.asList("group-2"), new CommentGroups(Arrays.asList("group-3", "group-2"), Arrays.asList("group-2"), new ArrayList<String>()), Arrays.asList("group-2"),
false, Arrays.asList("copy", "download", "print"), descr_user_3, false));
add(new User("uid-0", null, null,
"", null, new CommentGroups(),
"", null, new CommentGroups(), new ArrayList<String>(),
null, new ArrayList<String>(), descr_user_0, false));
}};

View File

@ -6,7 +6,7 @@ storage-folder=app_data
files.docservice.fill-docs=.oform|.docx
files.docservice.viewed-docs=.pdf|.djvu|.xps|.oxps
files.docservice.edited-docs=.docx|.xlsx|.csv|.pptx|.txt|.docxf
files.docservice.convert-docs=.docm|.dotx|.dotm|.dot|.doc|.odt|.fodt|.ott|.xlsm|.xltx|.xltm|.xlt|.xls|.ods|.fods|.ots|.pptm|.ppt|.ppsx|.ppsm|.pps|.potx|.potm|.pot|.odp|.fodp|.otp|.rtf|.mht|.html|.htm|.xml|.epub|.fb2
files.docservice.convert-docs=.docm|.dotx|.dotm|.dot|.doc|.odt|.fodt|.ott|.xlsm|.xlsb|.xltx|.xltm|.xlt|.xls|.ods|.fods|.ots|.pptm|.ppt|.ppsx|.ppsm|.pps|.potx|.potm|.pot|.odp|.fodp|.otp|.rtf|.mht|.html|.htm|.xml|.epub|.fb2
files.docservice.timeout=120000
files.docservice.url.site=http://documentserver/

View File

@ -741,12 +741,9 @@ html {
width: 30vw;
min-width: 200px;
max-width: 400px;
margin-top: 20px;
}
.user-descr > b {
margin-left: 25px;
}
.portal-descr:nth-child(3) {
margin-bottom: 20px;
}

View File

@ -145,6 +145,7 @@
Get started with a demo-sample of ONLYOFFICE Document Editors, the first html5-based editors.
<br /> You may upload your own documents for testing using the "<b>Upload file</b>" button and <b>selecting</b> the necessary files on your PC.
</span>
<span class="portal-descr">Please do NOT use this integration example on your own server without proper code modifications, it is intended for testing purposes only. In case you enabled this test example, disable it before going for production.</span>
<span class="portal-descr">You can open the same document using different users in different Web browser sessions, so you can check out multi-user editing functions.</span>
<% for (User user : Users.getAllUsers()) { %>
<div class="user-descr">