mirror of
https://github.com/ONLYOFFICE/document-server-integration.git
synced 2026-04-07 14:06:11 +08:00
Merge remote-tracking branch 'remotes/origin/develop' into feature/jwtHistoryFiles
# Conflicts: # web/documentserver-example/java/README.md
This commit is contained in:
@ -27,7 +27,7 @@
|
||||
from urllib.parse import unquote
|
||||
|
||||
class User:
|
||||
def __init__(self, id, name, email, group, reviewGroups, commentGroups, favorite, deniedPermissions, descriptions, templates):
|
||||
def __init__(self, id, name, email, group, reviewGroups, commentGroups, userInfoGroups, favorite, deniedPermissions, descriptions, templates):
|
||||
self.id = id
|
||||
self.name = name
|
||||
self.email = email
|
||||
@ -38,6 +38,7 @@ class User:
|
||||
self.deniedPermissions = deniedPermissions
|
||||
self.descriptions = descriptions
|
||||
self.templates = templates
|
||||
self.userInfoGroups = userInfoGroups
|
||||
|
||||
descr_user_1 = [
|
||||
"File author by default",
|
||||
@ -45,7 +46,8 @@ descr_user_1 = [
|
||||
"Can review all the changes",
|
||||
"Can perform all actions with comments",
|
||||
"The file favorite state is undefined",
|
||||
"Can create files from templates using data from the editor"
|
||||
"Can create files from templates using data from the editor",
|
||||
"Can see the information about all users"
|
||||
]
|
||||
|
||||
descr_user_2 = [
|
||||
@ -53,7 +55,8 @@ descr_user_2 = [
|
||||
"Can review only his own changes or changes made by users with no group",
|
||||
"Can view comments, edit his own comments and comments left by users with no group. Can remove his own comments only",
|
||||
"This file is marked as favorite",
|
||||
"Can create new files from the editor"
|
||||
"Can create new files from the editor",
|
||||
"Can see the information about users from Group2 and users who don’t belong to any group"
|
||||
]
|
||||
|
||||
descr_user_3 = [
|
||||
@ -64,7 +67,8 @@ descr_user_3 = [
|
||||
"Can’t copy data from the file to clipboard",
|
||||
"Can’t download the file",
|
||||
"Can’t print the file",
|
||||
"Can create new files from the editor"
|
||||
"Can create new files from the editor",
|
||||
"Can see the information about Group2 users"
|
||||
]
|
||||
|
||||
descr_user_0 = [
|
||||
@ -74,12 +78,13 @@ descr_user_0 = [
|
||||
"Can perform all actions with comments",
|
||||
"The file favorite state is undefined",
|
||||
"Can't mention others in comments",
|
||||
"Can't create new files from the editor"
|
||||
"Can't create new files from the editor",
|
||||
"Can’t see anyone’s information"
|
||||
]
|
||||
|
||||
USERS = [
|
||||
User('uid-1', 'John Smith', 'smith@example.com',
|
||||
'', None, {},
|
||||
'', None, {}, None,
|
||||
None, [], descr_user_1, True),
|
||||
User('uid-2', 'Mark Pottato', 'pottato@example.com',
|
||||
'group-2', ['group-2', ''], {
|
||||
@ -87,16 +92,17 @@ USERS = [
|
||||
'edit': ["group-2", ""],
|
||||
'remove': ["group-2"]
|
||||
},
|
||||
['group-2', ''],
|
||||
True, [], descr_user_2, False),
|
||||
User('uid-3', 'Hamish Mitchell', 'mitchell@example.com',
|
||||
'group-3', ['group-2'], {
|
||||
'view': ["group-3", "group-2"],
|
||||
'edit': ["group-2"],
|
||||
'remove': []
|
||||
},
|
||||
}, ['group-2'],
|
||||
False, ["copy", "download", "print"], descr_user_3, False),
|
||||
User('uid-0', None, None,
|
||||
'', None, {},
|
||||
'', None, {}, [],
|
||||
None, [], descr_user_0, False)
|
||||
]
|
||||
|
||||
|
||||
@ -168,7 +168,8 @@ def edit(request):
|
||||
submitForm = edMode == 'fillForms' and user.id == 'uid-1' and False # if the Submit form button is displayed or hidden
|
||||
mode = 'edit' if canEdit & (edMode != 'view') else 'view' # if the file can't be edited, the mode is view
|
||||
|
||||
edType = request.GET.get('type') if request.GET.get('type') else 'desktop' # get the editor type: embedded/mobile/desktop (the default type is desktop)
|
||||
types = ['desktop', 'mobile', 'embedded']
|
||||
edType = request.GET.get('type') if request.GET.get('type') in types else 'desktop' # get the editor type: embedded/mobile/desktop (the default type is desktop)
|
||||
lang = request.COOKIES.get('ulang') if request.COOKIES.get('ulang') else 'en' # get the editor language (the default language is English)
|
||||
|
||||
storagePath = docManager.getStoragePath(filename, request)
|
||||
@ -225,7 +226,8 @@ def edit(request):
|
||||
'modifyContentControl': edMode != "blockcontent",
|
||||
'review': canEdit & ((edMode == 'edit') | (edMode == 'review')),
|
||||
'reviewGroups': user.reviewGroups,
|
||||
'commentGroups': user.commentGroups
|
||||
'commentGroups': user.commentGroups,
|
||||
'userInfoGroups': user.userInfoGroups
|
||||
}
|
||||
},
|
||||
'editorConfig': {
|
||||
|
||||
Reference in New Issue
Block a user