Compare commits

...

503 Commits

Author SHA1 Message Date
bff8c83283 Merge pull request #410 from ONLYOFFICE/feature/python-server-configuration
python: simplify server configuration
2023-07-14 10:43:29 +03:00
827bd3981f python: add missed django_settings_module 2023-07-13 17:10:10 +04:00
e8599c7c56 python: add recipes to start the server 2023-07-13 17:10:06 +04:00
0a3b951eb6 Merge pull request #412 from ONLYOFFICE/feature/ruby-respect-gitignore
ruby: respect gitignore
2023-07-13 15:25:59 +03:00
988da27e3f python: simplify server configuration 2023-07-13 16:23:09 +04:00
a697219dcf ruby: add receipt stages to generate bin files 2023-07-13 16:04:54 +04:00
7649e7f51e ruby: delete files that should be ignored 2023-07-13 16:02:24 +04:00
108b5ea317 ruby: move example-specific ignored files to the root of the example 2023-07-13 16:02:24 +04:00
4ea0760803 Merge pull request #411 from ONLYOFFICE/feature/ruby-server-configuration
ruby: simplify server configuration
2023-07-13 14:51:07 +03:00
c558098deb ruby: delete sqlite3 2023-07-13 14:48:57 +03:00
4a61093343 Merge pull request #409 from ONLYOFFICE/feature/python-configuration-manager
python: add support for configuration via environment variables
2023-07-13 14:46:34 +03:00
2af1f56aa7 ruby: delete sqlite3 as it's not used 2023-07-13 14:02:30 +04:00
6780feafa6 ruby: add recipes to start the server 2023-07-13 14:02:26 +04:00
23b4ffc104 ruby: simplify server configuration 2023-07-12 13:44:20 +04:00
46a9fffb0e 7.4 formats 2023-07-12 11:46:15 +03:00
0ccc98e83f python: standardize the format of URLs 2023-07-10 16:29:59 +04:00
7f59c15112 python: replace the global config with the configuration manager 2023-07-10 16:29:59 +04:00
455f2ee823 python: add tests for the configuration manager 2023-07-10 16:29:51 +04:00
3076a9bc0e python: add configuration manager 2023-07-10 16:05:30 +04:00
c605607b5e python: add test recipe 2023-07-10 14:52:21 +04:00
e05afc931a python: add tests for the string boolean function 2023-07-10 14:49:25 +04:00
53aeb19e2f python: add the common module with string boolean function 2023-07-10 14:46:33 +04:00
14a557be69 Merge pull request #396 from ONLYOFFICE/feature/ruby-configuration-environment
ruby: support for configuration via environment variables
2023-07-10 10:28:24 +03:00
666b6f8a03 Merge pull request #408 from ONLYOFFICE/fix/ruby-sorbet-platforms
ruby: fix sorbet installation on unsupported platforms
2023-07-07 15:33:10 +03:00
ebddc8114a ruby: fix sorbet installation on unsupported platforms 2023-07-05 12:26:00 +04:00
fa76819b2d Merge pull request #403 from ONLYOFFICE/feature/python-normalize-dependencies
python: pin and add new dependencies
2023-07-05 10:02:00 +03:00
69aa25880a python: 3rd party licenses 2023-07-05 10:00:21 +03:00
7cd79280ff python: add help, dev, lint, prod recipes to Makefile 2023-07-04 16:57:03 +04:00
4535bfe661 python: add development dependencies 2023-07-04 16:56:57 +04:00
01cabdf1e5 python: pin python version 2023-07-04 14:12:11 +04:00
8b15a0e417 python: pin dependency versions 2023-07-04 14:12:11 +04:00
451b3b7a38 ruby: standardize the format of the URIs in the configuration 2023-07-04 13:52:40 +04:00
952b495c4d ruby: support for configuration via environment variables 2023-07-04 13:52:37 +04:00
1cd3642de8 Merge pull request #407 from ONLYOFFICE/feature/reference-source
Feature/reference source
2023-07-04 12:49:58 +03:00
a4f49cb86b nodejs: change reference source to changelog 2023-07-04 12:45:15 +03:00
9ca722329f nodejs: 1.6.0 (50a4ddbd11) 2023-07-04 10:51:24 +03:00
496a150620 nodejs: onRequestReferenceSource method 2023-06-30 11:29:38 +03:00
983a92d9e0 nodejs: function for getting of file extension 2023-06-30 11:27:48 +03:00
ad94016a85 Merge remote-tracking branch 'remotes/origin/master' into develop
# Conflicts:
#	CHANGELOG.md
#	web/documentserver-example/php/functions.php
#	web/documentserver-example/php/views/DocEditorView.php
2023-06-29 11:13:23 +05:00
fcb807471f Merge pull request #406 from ONLYOFFICE/release/1.6.0
Release/1.6.0
2023-06-29 11:07:55 +05:00
50a4ddbd11 1.6.0 2023-06-29 11:00:42 +05:00
01d1dc4274 Merge pull request #405 from ONLYOFFICE/hotfix/csharp-reload-filelist-upload
Hotfix/csharp reload filelist upload
2023-06-28 11:20:58 +05:00
1447b304eb Merge pull request #404 from ONLYOFFICE/hotfix/delete-old-file-after-convert
Hotfix/delete old file after convert
2023-06-28 11:20:24 +05:00
8e79c6448f csharp: reload after click on edit or view in upload window 2023-06-27 12:08:59 +03:00
badf3c7d49 csharp-mvc: reload after click on edit or view in upload window 2023-06-27 12:08:35 +03:00
342b31f7d7 java-spring: delete original file after convert 2023-06-27 11:32:28 +03:00
0ae8f5d396 java: delete original file after convert 2023-06-27 11:09:43 +03:00
7a238c2b73 Merge branch 'release/v7.4.0' into hotfix/delete-old-file-after-convert 2023-06-27 10:55:39 +03:00
0b4c67e552 Merge branch 'hotfix/headers-charset-on-upload-convert' into release/v7.4.0 2023-06-27 12:10:42 +05:00
f5391051b1 ruby: delete original file after convert 2023-06-27 09:59:00 +03:00
01c8a940d4 csharp: fix error with convert response (6aa80c4a8c) 2023-06-26 17:33:42 +05:00
579992e40b Merge pull request #402 from ONLYOFFICE/hotfix/csharp
fixed: generating key
2023-06-26 15:42:14 +05:00
3a2218a466 Merge pull request #401 from ONLYOFFICE/hotfix/ruby-filelist-reload-fix
ruby: reload after click on edit or view in upload window
2023-06-26 15:40:55 +05:00
0ea28f525f Merge pull request #400 from ONLYOFFICE/hotfix/disable-cors-on-download
php: disable CORS on download
2023-06-26 15:40:27 +05:00
33363f6144 fixed: generating key 2023-06-26 13:01:03 +03:00
da8bdca022 ruby: reload after click on edit or view in upload window 2023-06-26 12:52:17 +03:00
c4eccc5ee8 Merge pull request #398 from ONLYOFFICE/hotfix/php-sample-key-fix
php: undefined "sample" key fix
2023-06-26 14:24:02 +05:00
ab13745cf6 Merge pull request #399 from ONLYOFFICE/hotfix/referenceData
Hotfix/reference data
2023-06-26 14:23:09 +05:00
97f07e4275 ruby: fixed directUrl property 2023-06-26 12:20:07 +03:00
7c3e250797 php: undefined "sample" key fix 2023-06-26 11:40:57 +03:00
32ab794f11 python: fixed directUrl property 2023-06-26 11:23:03 +03:00
800ef84f84 csharp: fixed directUrl property 2023-06-26 11:18:52 +03:00
a7e4036667 php: fixed directUrl property 2023-06-26 11:11:52 +03:00
4f589a7394 java: fixed directUrl property 2023-06-26 11:05:01 +03:00
a3abb58d72 java-spring: fixed directUrl property 2023-06-26 10:21:21 +03:00
17536df8e5 csharp-mvc: fixed directUrl property 2023-06-26 10:08:44 +03:00
2e8a483a0c csharp-mvc: fix error with convert response (d9a79e20d7) 2023-06-26 11:47:38 +05:00
a0aa7b4fd0 php: disable CORS on download 2023-06-23 13:38:06 +03:00
8b720beffa Merge pull request #397 from ONLYOFFICE/hotfix/java-spring
java-spring: fixed bug with update external links reference data
2023-06-23 11:36:50 +05:00
a1c286cbaa java-spring: fixed bug with update external links reference data 2023-06-23 09:05:26 +03:00
fc377b967d Merge pull request #395 from ONLYOFFICE/hotfix/disable-cors-for-download
python: disable CORS in download
2023-06-22 17:43:07 +05:00
b2de5eff4c Merge pull request #394 from ONLYOFFICE/hotfix/python-reload-file-list
python: reload file list after start of editing
2023-06-22 17:42:31 +05:00
02439f3699 Merge pull request #393 from ONLYOFFICE/hotfix/php-fixes-release-740
Hotfix/php fixes for release 7.4.0
2023-06-22 17:41:28 +05:00
2429f21a84 python: disable CORS in download 2023-06-22 12:13:36 +03:00
aa0a4b5400 php: encoded space used 2023-06-22 11:48:51 +03:00
a28300848b python: reload file list after start of editing 2023-06-22 11:22:56 +03:00
fec0e87218 php: fix warnings in editor 2023-06-22 10:46:36 +03:00
efbace1e8b php: correct name of file when downloading 2023-06-22 10:30:37 +03:00
35e479355a php: convert warning fix 2023-06-22 10:22:17 +03:00
32c91b9016 Merge pull request #392 from ONLYOFFICE/hotfix/users-permissions-fix
java: null instead of empty lists
2023-06-21 16:01:01 +05:00
183d165c00 java: null instead of empty lists 2023-06-21 12:40:35 +03:00
a996f2c3c3 Merge pull request #390 from ONLYOFFICE/hotfix/content-disposition-for-download-encode
python: filename encoding for content-disposition header
2023-06-21 13:19:06 +05:00
782243eb86 Merge pull request #391 from ONLYOFFICE/hotfix/java-spring
Hotfix/java spring
2023-06-21 13:18:15 +05:00
f058d68126 fix bug with switching from view to edit 2023-06-21 11:11:33 +03:00
a8f07fce4d fix bug with upload file size more 1MB 2023-06-21 11:11:28 +03:00
025bd1068d fix bug with file conversion 2023-06-21 11:11:17 +03:00
75b22614cf refresh licenses 2023-06-21 12:29:59 +05:00
6cb15697ab Merge pull request #388 from ONLYOFFICE/feature/ruby-normalize-dependencies
ruby: pin and add new dependencies
2023-06-21 12:12:22 +05:00
1da93ce071 python: filename encoding for content-disposition header 2023-06-21 09:37:26 +03:00
837e34de37 Merge pull request #389 from ONLYOFFICE/hotfix/convert-status-code-type
ruby: fix conversion service status type
2023-06-20 13:52:27 +05:00
20c4ec1b78 ruby: fix conversion service status type 2023-06-20 11:30:40 +03:00
39bab74422 Merge pull request #383 from ONLYOFFICE/feature/formats
Feature/formats
2023-06-19 11:47:19 +05:00
665ab6a77d formats to changelog 2023-06-19 11:47:03 +05:00
5663227c55 update formats repo 2023-06-19 11:45:26 +05:00
42ac89e5e5 Merge pull request #370 from ONLYOFFICE/hotfix/headers-charset-on-upload-convert
java: upload and convert fix
2023-06-19 11:33:09 +05:00
c95499536d ruby: add lint recipe to Makefile 2023-06-14 10:38:35 +04:00
5659756c07 ruby: add install recipe to Makefile 2023-06-14 10:38:35 +04:00
038b3b3049 ruby: add help recipe to Makefile 2023-06-14 10:38:35 +04:00
6b555c4d0d ruby: add sorbet as a type-checker dependency 2023-06-14 10:38:27 +04:00
44d49bed62 ruby: add rubocop as a lint dependency 2023-06-14 10:23:02 +04:00
517b130db6 ruby: pin ruby version 2023-06-09 12:13:40 +04:00
0ff435b9bd ruby: pin dependency versions and add support for the arm64 platform 2023-06-09 12:13:14 +04:00
56bc372140 Merge remote-tracking branch 'remotes/origin/release/v7.4.0' into develop
# Conflicts:
#	web/documentserver-example/nodejs/helpers/docManager.js
2023-06-07 18:57:00 +05:00
0068b6d87d Merge pull request #381 from ONLYOFFICE/feature/getServerHost
Fix get server host function
2023-06-07 18:44:17 +05:00
4679804774 Merge pull request #386 from ONLYOFFICE/hotfix/fix-php-readme
php: composer installation added to readme
2023-06-07 16:30:48 +05:00
d03f74087c php: composer installation added to readme 2023-06-07 16:29:57 +05:00
e3a088ccaf nodejs: fix undefined header 2023-06-07 13:29:45 +05:00
5865fedbe7 java: upload and convert fix 2023-06-05 10:19:58 +03:00
68390aa26c php: lossy-edit to getEditExtensions() 2023-06-02 12:31:41 +03:00
744e5203cb nodejs: lossy-edit to getEditExtensions() 2023-06-02 12:29:44 +03:00
7df7af3f47 nodejs, php: update submodule document-formats 2023-06-02 12:21:00 +03:00
bf40cd1249 Merge branch 'develop' into feature/formats 2023-06-02 11:01:19 +03:00
f3cb5adb22 nodejs: fix (668df46ec3) 2023-06-02 11:00:30 +03:00
c8d44199c2 php: fix lint 2023-06-01 16:21:36 +03:00
12bcc0009b nodejs: disable eslint for import onlyoffice-docs-formats.json 2023-06-01 16:14:12 +03:00
be1ea81f82 Merge branch 'develop' into feature/formats 2023-06-01 15:53:41 +03:00
668df46ec3 nodejs: fix(dd3255779f) 2023-06-01 15:53:07 +03:00
43905695e0 nodejs: fix lint 2023-06-01 14:50:06 +03:00
4a49becea1 php: revert composer.lock 2023-05-31 15:34:42 +03:00
c91d3a24b9 update submodule document-formats 2023-05-31 14:39:48 +03:00
d6a4984b84 Merge pull request #382 from ONLYOFFICE/feature/restore-version
Feature/restore version
2023-05-22 15:45:19 +05:00
f1dae06746 changelog: restore file 2023-05-22 15:44:45 +05:00
3cf3bcf2c8 Merge remote-tracking branch 'remotes/origin/develop' into feature/restore-version 2023-05-22 15:44:11 +05:00
aa6e19ebaa Merge pull request #372 from ONLYOFFICE/dependabot/bundler/web/documentserver-example/ruby/nokogiri-1.14.3
build(deps): bump nokogiri from 1.13.9 to 1.14.3 in /web/documentserver-example/ruby
2023-05-22 14:01:04 +05:00
24a26fd530 Correct spelling mistake 2023-05-19 12:57:10 +00:00
a5f91bc14f Fix get server host function 2023-05-19 09:07:38 +00:00
d7034c72c9 Merge pull request #379 from ONLYOFFICE/feature/remove-row-without-reload
nodejs: remove row without reload
2023-05-18 18:12:46 +05:00
c0437b152f remove row to changelog 2023-05-18 18:10:44 +05:00
b72b2c6619 Merge branch 'develop' into feature/remove-row-without-reload
# Conflicts:
#	web/documentserver-example/nodejs/public/javascripts/jscript.js
2023-05-18 13:34:34 +03:00
c516631360 nodejs: fix remove for IE 2023-05-18 13:31:50 +03:00
5cc8d7c094 Merge pull request #380 from ONLYOFFICE/feature/get-history-by-request
nodejs: get history data by request
2023-05-18 11:23:10 +05:00
5f4764060c changelog: history request 2023-05-18 11:22:17 +05:00
44832008a8 nodejs: reload the page if deleted line is the last one 2023-05-17 13:24:28 +03:00
d86e737493 nodejs: fix properties for IE, historyObject used in requestRestore 2023-05-17 12:59:55 +03:00
07a1e3101b Merge branch 'feature/get-history-by-request' into feature/restore-version 2023-05-17 12:55:51 +03:00
1ebfe49916 nodejs: fix properties for IE 2023-05-17 12:54:15 +03:00
b1d6f8d652 Merge branch 'feature/get-history-by-request' into feature/restore-version 2023-05-17 12:46:15 +03:00
8f0edf90e6 nodejs: request in onRequestHistory only 2023-05-17 12:43:33 +03:00
7c77389550 build(deps): bump nokogiri in /web/documentserver-example/ruby
Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.13.9 to 1.14.3.
- [Release notes](https://github.com/sparklemotion/nokogiri/releases)
- [Changelog](https://github.com/sparklemotion/nokogiri/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sparklemotion/nokogiri/compare/v1.13.9...v1.14.3)

---
updated-dependencies:
- dependency-name: nokogiri
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-17 12:42:09 +05:00
637731a4d7 Merge pull request #373 from ONLYOFFICE/refactor/collect-params-for-url
Refactor/collect params for url
2023-05-17 12:34:35 +05:00
6fc98a025b Merge branch 'feature/get-history-by-request' into feature/restore-version
# Conflicts:
#	web/documentserver-example/nodejs/app.js
2023-05-12 13:03:31 +03:00
f123cbcce3 nodejs: handler for restore file version 2023-05-12 13:00:48 +03:00
11f166525e nodejs: onRequestRestore method on front 2023-05-12 12:56:24 +03:00
68db498dfd nodejs: get history data by request 2023-05-12 11:12:32 +03:00
f914afcc53 nodejs: remove row without reload 2023-05-11 15:14:07 +03:00
8dcf75f3fb nodejs: get history data by request 2023-05-11 14:06:48 +03:00
3d9e091882 Merge pull request #378 from ONLYOFFICE/hotfix/disable-rule-for-old-nodejs
nodejs: hasOwnProperty() used instead of hasOwn() for NodeJS v.14
2023-05-10 17:36:27 +05:00
a9ca4b3272 Merge remote-tracking branch 'remotes/origin/release/v7.4.0' into develop 2023-05-10 17:32:40 +05:00
a722b04226 Merge pull request #375 from ONLYOFFICE/feature/edited-chinese
edited language name zh
2023-05-10 17:29:49 +05:00
9a1110a56e ruby: edited language name zh 2023-05-10 17:28:40 +05:00
707122013f python: edited language name zh 2023-05-10 17:28:39 +05:00
f9ed5edf89 php: edited language name zh 2023-05-10 17:28:39 +05:00
dbf6766897 java-spring: edited language name zh 2023-05-10 17:28:39 +05:00
a60c594505 java: edited language name zh 2023-05-10 17:28:38 +05:00
2d0e6c0d3f csharp-mvc: edited language name zh 2023-05-10 17:28:38 +05:00
63e7461995 csharp: edited language name zh 2023-05-10 17:28:38 +05:00
d2491ae6b7 edited language name zh 2023-05-10 17:28:38 +05:00
35798a7916 nodejs: hasOwnProperty() used instead of hasOwn() for NodeJS v.14 2023-05-10 11:30:26 +03:00
f7000b51a7 Merge branch 'release/v7.4.0' into develop
# Conflicts:
#	web/documentserver-example/nodejs/app.js
#	web/documentserver-example/nodejs/helpers/users.js
2023-05-10 10:55:24 +05:00
7e36939392 Merge pull request #376 from ONLYOFFICE/feature/region-protect
setUsers for region protection
2023-05-03 17:52:40 +05:00
afec51b296 nodejs: setUsers for region protection 2023-05-03 13:08:11 +05:00
66faaab294 Merge branch 'develop' into refactor/collect-params-for-url
# Conflicts:
#	web/documentserver-example/nodejs/views/index.ejs
#	web/documentserver-example/nodejs/views/wopiIndex.ejs
2023-04-28 11:20:25 +03:00
7be2a5a507 nodejs: remove serverUrl 2023-04-27 16:45:22 +03:00
8cf26de5e2 Merge remote-tracking branch 'remotes/origin/release/v7.4.0' into develop 2023-04-27 15:15:15 +03:00
016611ba52 Merge pull request #374 from ONLYOFFICE/hotfix/nodejs-wopi-jquery-fix
nodejs: jquery fix in WOPI-template
2023-04-27 15:14:42 +03:00
73d1011e8a nodejs: jquery fix in WOPI-template 2023-04-27 15:14:00 +03:00
f2a11a5894 nodejs: WOPI-page fix 2023-04-27 14:54:36 +03:00
c6043d4428 nodejs: fix tabulation 2023-04-27 11:36:04 +03:00
c37ba28ad3 php: added work with onlyoffice-docs-formats.json 2023-04-27 11:33:57 +03:00
53f810fc54 php: added module document-formats 2023-04-27 10:48:48 +03:00
a55875ae1e php: added module document-templates 2023-04-27 10:46:33 +03:00
707a634823 php: removed module document-templates 2023-04-27 10:42:31 +03:00
b511fa872a nodejs: added module document-formats 2023-04-27 10:36:56 +03:00
4a2e7d9a9e nodejs: added module document-templates 2023-04-27 10:32:49 +03:00
e4d5de2c0e removed module document-templates 2023-04-27 10:24:32 +03:00
50dca2e2c0 php: added work with onlyoffice-docs-formats.json 2023-04-26 14:58:00 +03:00
893303c27f nodejs: added work with onlyoffice-docs-formats.json 2023-04-26 11:48:38 +03:00
b543392c62 nodejs: server url to link in logo 2023-04-26 09:22:39 +03:00
adf52c756e nodejs: fix url-params + IE fix 2023-04-21 12:55:02 +03:00
693cc5a951 Merge pull request #369 from ONLYOFFICE/refactor/format-by-linter-nodejs
Refactor/format by linter nodejs
2023-04-21 09:40:20 +05:00
ff9ba7fbf1 Merge pull request #371 from ONLYOFFICE/hotfix/editor-warning-fix
php: editor warnings fix
2023-04-20 17:06:59 +05:00
c2b87959a2 nodejs: collectParams() instead of reload() + input text added 2023-04-19 11:14:45 +03:00
18ee7776ef nodejs: radio elements + "name" attribute instead of "data-param" 2023-04-19 10:06:29 +03:00
c99efda67a nodejs: open window in new tab 2023-04-19 09:25:49 +03:00
d65f970255 nodejs: collectParams() method added 2023-04-18 14:45:31 +03:00
f5442a8a89 nodejs: url params for collectable elements 2023-04-18 14:44:04 +03:00
e347ea36ce nodejs: "params" in links deleted, added class for actions 2023-04-18 11:50:54 +03:00
f0651dabf0 php: editor warnings fix 2023-04-10 12:31:04 +03:00
ccf85c1c0f nodejs: "no-plusplus" - rule excluded for loops 2023-04-05 15:16:33 +03:00
6ea35bf55c Merge branch 'refactor/format-by-linter-nodejs' of https://github.com/ONLYOFFICE/document-server-integration into refactor/format-by-linter-nodejs 2023-04-05 15:05:05 +03:00
f6afde346a nodejs: await in loops excluded from check 2023-04-05 15:04:50 +03:00
ce4074bcce nodejs: change order 2023-04-05 11:46:06 +05:00
5697b58aa2 nodejs: radix parameters for parseInt() 2023-04-04 12:57:32 +03:00
d5e6301211 nodejs: no restricted syntax 2023-04-04 12:50:45 +03:00
9048082cb7 nodejs: no shadow vars 2023-04-04 11:05:29 +03:00
63526226be typo in changelog 2023-04-04 12:40:10 +05:00
fb07785b0e Merge pull request #368 from ONLYOFFICE/feature/fix-lang
Feature/fix lang
2023-04-04 12:31:08 +05:00
91638382d3 lang code to changelog 2023-04-04 12:30:14 +05:00
56e46466b2 nodejs: useless rules deleted, autofixed spaces before parenthesis, arrow functions syntax, and comma after arguments added 2023-04-03 17:05:26 +03:00
fa9731ab57 nodejs: no unnamed functions 2023-04-03 16:44:48 +03:00
c2ba46ce85 nodejs: no await in loops 2023-04-03 15:25:43 +03:00
4c5780f1d6 nodejs: default param last 2023-04-03 15:20:26 +03:00
0419611a62 nodejs: no prototype builtins 2023-04-03 15:17:57 +03:00
bcc1011ddd nodejs: no constant condition 2023-04-03 15:04:57 +03:00
91a4fe1e52 nodejs: no throw literal 2023-04-03 12:51:30 +03:00
21fed8a81e nodejs: off unused airbnb-base rules 2023-03-31 14:29:59 +03:00
f2fc63c24f nodejs: default cases required 2023-03-31 14:03:14 +03:00
521608fa15 nodejs: no unused else blocks 2023-03-31 13:55:35 +03:00
e16ad4e53d nodejs: define vars is required 2023-03-31 13:48:11 +03:00
7205e383c8 nodejs: no new RegExp() 2023-03-31 13:40:47 +03:00
9bf317b3e0 nodejs: camelCase used 2023-03-31 13:38:38 +03:00
ac668a41c5 nodejs: declaration of methods before use 2023-03-31 13:32:20 +03:00
606f4255dc nodejs: no useless return statements + ';' in the end 2023-03-31 13:03:15 +03:00
22a64dd932 nodejs: no mixed tabs 2023-03-31 12:34:05 +03:00
dd3255779f nodejs: required the use of === and !== 2023-03-31 12:30:04 +03:00
89c7e63ab8 nodejs: object curly spacing 2023-03-31 11:04:35 +03:00
447c604fe9 nodejs: no multiple empty lines 2023-03-31 10:54:40 +03:00
dff9602852 nodejs: require correct order 2023-03-31 10:00:32 +03:00
f4d7915dd6 nodejs: 'use strict' is unnecessary inside of modules 2023-03-31 09:35:57 +03:00
01204d544e nodejs: const declarations for variables that are never reassigned after declared 2023-03-30 17:03:40 +03:00
a06aa8c8b3 nodejs: max-length of lines - 120 2023-03-30 16:31:39 +03:00
7977427038 nodejs: no unused variables 2023-03-30 13:47:33 +03:00
0b8d0ed10a nodejs: disallowed spacing around embedded expressions of template strings 2023-03-30 12:33:52 +03:00
efec141039 nodejs: disallowed padding within blocks 2023-03-30 12:29:39 +03:00
6736555ff3 nodejs: constructor names to begin with a capital letter 2023-03-30 12:20:50 +03:00
d94fe30a3e nodejs: fix no nested ternary expressions 2023-03-30 12:12:04 +03:00
3079320534 nodejs: no multi spaces 2023-03-30 10:57:00 +03:00
4f3af51e54 nodejs: newline after each call in a method chain 2023-03-30 10:52:48 +03:00
d19c81c944 nodejs: EOL last 2023-03-30 10:48:34 +03:00
bc3cbbbb82 nodejs: spacing around infix operators 2023-03-30 10:47:14 +03:00
8ee3ddc925 nodejs: space before the opening parenthesis in control statements 2023-03-30 10:44:00 +03:00
173c05dbf3 nodejs: consistent indentation (2 spaces) 2023-03-30 10:41:27 +03:00
b13c548c4d nodejs: 1 space before comment text 2023-03-30 10:30:18 +03:00
ef8237adfd nodejs: disallowed else blocks after return statements in if statements 2023-03-30 10:24:06 +03:00
c80379da31 nodejs: braces for multi-line blocks with if and else 2023-03-30 10:22:04 +03:00
a54c43c0c2 nodejs: braces with all multi-line blocks 2023-03-30 10:19:25 +03:00
5e524aa148 nodejs: disallow bitwise operators 2023-03-30 10:12:41 +03:00
e84ee9e01b nodejs: no unneeded ternary operators 2023-03-30 09:32:01 +03:00
27ceb1e6c6 nodejs: no nested ternary expressions 2023-03-29 17:23:50 +03:00
508b0d913c nodejs: disallow the unary operators ++ and -- 2023-03-29 16:35:32 +03:00
5999b070dc nodejs: dot notation whenever possible 2023-03-29 15:43:55 +03:00
3ed13f3975 nodejs: braces around arrow function bodies 2023-03-29 13:33:51 +03:00
1789f7c9fd nodejs: parentheses around arrow function arguments 2023-03-29 13:31:33 +03:00
a05ea11dd7 nodejs: spacing before and after the arrow in arrow functions 2023-03-29 13:29:34 +03:00
c6dd46a004 nodejs: linebreaks inside function parentheses if any of the parameters/arguments have a line break between them 2023-03-29 13:27:07 +03:00
bf04979c31 nodejs: reassigning function parameters disallowed 2023-03-29 13:20:33 +03:00
e9274b7303 nodejs: spacing before blocks 2023-03-29 12:52:36 +03:00
03022c5b45 nodejs: spacing before function definition opening parenthesis 2023-03-29 12:50:35 +03:00
ce4ccdd5b0 nodejs: rest parameters instead of arguments 2023-03-29 12:32:28 +03:00
07eba65458 nodejs: used named function expressions instead of function declarations 2023-03-29 10:56:17 +03:00
072b082240 nodejs: require using arrow functions for callbacks 2023-03-29 09:49:21 +03:00
c664bc4ee9 nodejs: template literals instead of string concatenation 2023-03-28 17:38:41 +03:00
f113d7eeb1 nodejs: require destructuring from arrays and objects 2023-03-28 16:52:27 +03:00
9409bf0785 nodejs: quote only properties that are invalid identifiers 2023-03-28 15:41:02 +03:00
d51e724130 nodejs: method and property shorthand syntax for object literals 2023-03-28 15:35:27 +03:00
9489b4dcde nodejs: variables with block scope used 2023-03-28 14:46:09 +03:00
d9c139a42b nodejs: const declarations for variables that are never reassigned after declared 2023-03-28 14:08:15 +03:00
534f1d8284 nodejs: single quotes used 2023-03-28 14:02:31 +03:00
f177af8791 nodejs: added max-length (120) to ruleset 2023-03-28 13:57:52 +03:00
0b1a100be7 Merge pull request #367 from ONLYOFFICE/feature/format-fix-by-linter
java-spring: formatting by linter
2023-03-28 10:00:07 +05:00
3932aeabed java-spring: formatting by linter 2023-03-27 15:31:15 +03:00
be1dd93627 Merge remote-tracking branch 'remotes/origin/master' into develop
# Conflicts:
#	web/documentserver-example/php/index.php
2023-03-27 15:49:06 +05:00
fd75d3ce17 csharp: no, si lang code 2023-03-27 13:38:58 +03:00
eac69c683d csharp-mvc: no, si lang code 2023-03-27 13:37:29 +03:00
4351de8ec7 java: no, si lang code 2023-03-27 13:35:37 +03:00
4c4092634a java-spring: no, si lang code 2023-03-27 13:33:41 +03:00
efac4d4a66 php: no, si lang code 2023-03-27 13:30:04 +03:00
1afb1db3d5 python: no, si lang code 2023-03-27 13:28:08 +03:00
6b63d8298c ruby: no, si lang code 2023-03-27 13:24:58 +03:00
2a6e5e44bf Merge pull request #363 from ONLYOFFICE/hotfix/1.5.1
Hotfix/1.5.1
2023-03-27 15:23:02 +05:00
c76d93966f nodejs: no, si lang code 2023-03-27 14:34:51 +05:00
a74fef732e nodejs: change size on mobile only (a9d261a0ad)
Fix Bug 51285
2023-03-26 18:02:18 +05:00
06a692326e Merge pull request #366 from ONLYOFFICE/feature/convert-to-ooxml-on-upload
Feature/convert to ooxml on upload
2023-03-26 17:34:12 +05:00
cc73e6b42b convert to ooxml to changelog 2023-03-26 17:27:33 +05:00
7b926f1e11 Merge remote-tracking branch 'remotes/origin/develop' into feature/convert-to-ooxml-on-upload 2023-03-26 17:26:50 +05:00
bbb81f9bf1 conversation response to changelog 2023-03-26 17:24:17 +05:00
2b19d96646 Merge pull request #365 from ONLYOFFICE/feature/save-files-format
Feature/save files format
2023-03-26 17:21:49 +05:00
bfae48f32f python: save file in response type 2023-03-26 17:18:07 +05:00
a2a9fb3d25 php: save file in response type 2023-03-26 17:17:58 +05:00
5b9d4a7eb2 csharp-mvc: convert to .ooxlm 2023-03-24 12:48:35 +03:00
0f9144bb12 csharp: convert to .ooxlm 2023-03-24 12:47:06 +03:00
76dde2fac8 java: convert to .ooxlm 2023-03-24 12:44:19 +03:00
75f44a79d3 java-spring: convert to .ooxlm 2023-03-24 12:41:34 +03:00
d874ba0096 nodejs: convert to .ooxlm 2023-03-24 12:34:39 +03:00
7495ae9c15 ruby: convert to .ooxlm 2023-03-24 12:33:17 +03:00
ee5c892e2d php: convert to .ooxlm 2023-03-24 12:29:32 +03:00
c464e658fc python: convert to .ooxlm 2023-03-24 12:27:54 +03:00
575b68a8cf Merge pull request #364 from ONLYOFFICE/feature/ie11-horizontal-scroll-fix
Feature/ie11 horizontal scroll fix
2023-03-23 18:31:01 +05:00
16e39b5535 java: fix dockerfile path 2023-03-23 15:11:40 +03:00
5c3d64df54 java-spring: fix setCookie after open page 2023-03-23 14:29:23 +03:00
dcf0b500ec nodejs: save file in response type 2023-03-23 11:28:02 +03:00
a1fd64af8f php: jQuery path fix in template 2023-03-22 17:43:52 +03:00
e76f06fbd7 horizontal scroll fix for IE10-11 to changelog 2023-03-22 16:58:38 +03:00
dcac8cbbde ruby: horizontal scroll fix for IE10-11 2023-03-22 16:57:20 +03:00
497a7dc98f python: horizontal scroll fix for IE10-11 2023-03-22 16:56:33 +03:00
a3db74a449 php: horizontal scroll fix for IE10-11 2023-03-22 16:55:59 +03:00
7d74726b07 java-spring: horizontal scroll fix for IE10-11 2023-03-22 16:55:24 +03:00
36169cbaa8 java: horizontal scroll fix for IE10-11 2023-03-22 16:54:32 +03:00
1dcc0cb3b9 csharp-mvc: horizontal scroll fix for IE10-11 2023-03-22 16:53:45 +03:00
69cc5de02a csharp: horizontal scroll fix for IE10-11 2023-03-22 16:52:09 +03:00
a2cacd983e nodejs: horizontal scroll fix for IE10-11 2023-03-22 16:51:19 +03:00
be1616d6b6 ruby: save file in response type 2023-03-22 12:12:46 +05:00
d9a79e20d7 csharp-mvc: save file in response type 2023-03-22 12:12:29 +05:00
6aa80c4a8c csharp: save file in response type 2023-03-22 12:12:09 +05:00
8bf38e39ac java: save file in response type 2023-03-22 12:10:27 +05:00
35017c341d java-spring: save file in response type 2023-03-22 11:59:26 +05:00
2f91bdd1b8 Merge pull request #361 from ONLYOFFICE/bugfix/jwt
added: getters for FileModel, fix (4a902dff94a4c1139d2f820a9e42499d57…
2023-03-22 11:34:10 +05:00
f5c6fe76d3 Merge pull request #362 from ONLYOFFICE/feature/update-jquery
Feature/update jquery
2023-03-22 11:31:41 +05:00
e1d6bac33a Merge remote-tracking branch 'remotes/origin/hotfix/1.5.1' into feature/update-jquery
# Conflicts:
#	CHANGELOG.md
#	web/documentserver-example/php/config.php
#	web/documentserver-example/php/index.php
#	web/documentserver-example/python/licenses/jQuery.license
2023-03-22 11:29:45 +05:00
2724f007db 1.5.1 2023-03-22 11:13:14 +05:00
8744e79b62 update jquery to changelog 2023-03-22 11:09:28 +05:00
a0abfb39a7 license: update jquery license text 2023-03-22 11:05:42 +05:00
ccd5584b0c ruby: licenses for jQuery.Migrate 2023-03-21 21:32:05 +05:00
a871b29d7c ruby: jquery-3.6.4 instead of 1.8.2 2023-03-21 21:32:05 +05:00
4f5c38be87 java-spring: licenses for jQuery.Migrate 2023-03-21 21:32:05 +05:00
cc1b3cdbe8 java=spring: jquery-3.6.4 instead of 1.8.2 2023-03-21 21:32:05 +05:00
0387b80843 java: licenses for jQuery.Migrate 2023-03-21 21:32:05 +05:00
2c1a160215 java: jquery-3.6.4 instead of 1.8.2 2023-03-21 21:32:05 +05:00
5c773cb5e6 csharp-mvc: licenses for jQuery.Migrate 2023-03-21 21:32:04 +05:00
5b666247cc csharp-mvc: jquery-3.6.4 instead of 1.8.2 2023-03-21 21:32:04 +05:00
7c0b67215e nodejs: license for jQuery.Migrate to main 3rd-Party.license 2023-03-21 21:32:04 +05:00
18650f7da2 csharp: licenses for jQuery.Migrate 2023-03-21 21:32:04 +05:00
b62214a416 csharp: jquery-3.6.4 instead of 1.9.0 2023-03-21 21:32:04 +05:00
d4ed01196e nodejs: licenses for jQuery.Migrate 2023-03-21 21:32:04 +05:00
9ec9cd4912 nodejs: jquery-3.6.4 instead of 1.8.2 2023-03-21 21:32:03 +05:00
547da16760 python: licenses for jQuery.Migrate 2023-03-21 21:32:03 +05:00
51be4d06d8 python: jquery-3.6.4 instead of 1.9.0 2023-03-21 21:32:03 +05:00
456b27e4c3 php: licenses for jQuery.Migrate 2023-03-21 21:32:03 +05:00
3f9f0d01f6 php: jquery-3.6.4 instead of 1.9.0 2023-03-21 21:32:03 +05:00
60222f3068 python: licenses list added 2023-03-21 21:27:37 +05:00
49084614cd added: getters for FileModel, fix (4a902dff94) 2023-03-21 10:18:44 +03:00
e5b8628760 ruby: licenses for jQuery.Migrate 2023-03-20 10:16:14 +03:00
f0dbf0f9a0 ruby: jquery-3.6.4 instead of 1.8.2 2023-03-20 10:14:53 +03:00
072ba012ab java-spring: licenses for jQuery.Migrate 2023-03-20 10:13:22 +03:00
01f7f18cd4 java=spring: jquery-3.6.4 instead of 1.8.2 2023-03-20 09:43:41 +03:00
e6511a5b69 java: licenses for jQuery.Migrate 2023-03-20 09:40:56 +03:00
43b9f31aa6 java: jquery-3.6.4 instead of 1.8.2 2023-03-20 09:39:26 +03:00
eb5b4f42c7 csharp-mvc: licenses for jQuery.Migrate 2023-03-20 09:36:29 +03:00
12f5528d90 csharp-mvc: jquery-3.6.4 instead of 1.8.2 2023-03-20 09:30:31 +03:00
ae58966ef0 nodejs: format 2023-03-18 21:37:03 +05:00
a0e22c1304 nodejs: license for jQuery.Migrate to main 3rd-Party.license 2023-03-17 14:36:18 +03:00
3fc916e8da csharp: licenses for jQuery.Migrate 2023-03-17 14:35:07 +03:00
084e9cfca2 csharp: jquery-3.6.4 instead of 1.9.0 2023-03-17 14:30:45 +03:00
d943bf26cc nodejs: licenses for jQuery.Migrate 2023-03-17 14:27:10 +03:00
1983f170d3 nodejs: jquery-3.6.4 instead of 1.8.2 2023-03-17 14:23:21 +03:00
22a3608238 python: licenses for jQuery.Migrate 2023-03-17 13:50:03 +03:00
40c4a37e4a python: jquery-3.6.4 instead of 1.9.0 2023-03-17 13:46:46 +03:00
03d0068038 php: licenses for jQuery.Migrate 2023-03-17 13:24:48 +03:00
d8771a877b php: jquery-3.6.4 instead of 1.9.0 2023-03-17 13:13:19 +03:00
1e2ac3e23c Merge branch 'master' into develop 2023-03-17 12:02:40 +05:00
1683a08660 artifact on master only 2023-03-17 12:02:27 +05:00
459c7cd233 Merge pull request #359 from ONLYOFFICE/feature/prevent-anonymous-edit
Feature/prevent anonymous edit
2023-03-17 12:00:32 +05:00
c0241a84be onRequestEditRights to changelog 2023-03-17 11:56:54 +05:00
0df40f97ea Merge pull request #360 from ONLYOFFICE/dependabot/bundler/web/documentserver-example/ruby/rack-2.2.6.4
build(deps): bump rack from 2.2.4 to 2.2.6.4 in /web/documentserver-example/ruby
2023-03-17 11:54:03 +05:00
b7aa93e628 Merge branch 'develop' into dependabot/bundler/web/documentserver-example/ruby/rack-2.2.6.4 2023-03-17 11:53:47 +05:00
d47ec1820a build(deps): bump rack in /web/documentserver-example/ruby
Bumps [rack](https://github.com/rack/rack) from 2.2.4 to 2.2.6.4.
- [Release notes](https://github.com/rack/rack/releases)
- [Changelog](https://github.com/rack/rack/blob/main/CHANGELOG.md)
- [Commits](https://github.com/rack/rack/compare/2.2.4...v2.2.6.4)

---
updated-dependencies:
- dependency-name: rack
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-16 11:17:15 +00:00
3952663302 php: re-hide edit icon on view screen for anonymous 2023-03-15 11:18:32 +05:00
9e39adddcc php: hide edit icon on view screen for anonymous 2023-03-14 16:26:32 +05:00
f79fb213f1 ruby: hide edit icon on view screen for anonymous 2023-03-14 16:16:01 +05:00
c236f2902e python: hide edit icon on view screen for anonymous 2023-03-14 15:53:34 +05:00
96368f871c java-spring: hide edit icon on view screen for anonymous 2023-03-14 15:51:33 +05:00
5831c7f651 java: hide edit icon on view screen for anonymous 2023-03-14 15:50:03 +05:00
52706402a2 csharp-mvc: hide edit icon on view screen for anonymous 2023-03-14 15:42:12 +05:00
90be38c240 csharp: hide edit icon on view screen for anonymous 2023-03-14 13:30:49 +05:00
19f75a0646 nodejs: hide edit icon on view screen for anonymous 2023-03-14 13:02:14 +05:00
4fd38856fd Merge pull request #358 from ONLYOFFICE/feature/csharp-close-history
Feature/csharp close history
2023-03-13 14:17:58 +05:00
593ad9559f csharp-mvc: add close history button 2023-03-13 13:39:13 +05:00
8d06c0afcb csharp: add close history button 2023-03-13 13:36:46 +05:00
4b3b44d828 Merge pull request #356 from ONLYOFFICE/dependabot/bundler/web/documentserver-example/ruby/rack-2.2.6.3
build(deps): bump rack from 2.2.4 to 2.2.6.3 in /web/documentserver-example/ruby
2023-03-13 11:29:11 +05:00
bb9d73610e build(deps): bump rack in /web/documentserver-example/ruby
Bumps [rack](https://github.com/rack/rack) from 2.2.4 to 2.2.6.3.
- [Release notes](https://github.com/rack/rack/releases)
- [Changelog](https://github.com/rack/rack/blob/main/CHANGELOG.md)
- [Commits](https://github.com/rack/rack/compare/2.2.4...v2.2.6.3)

---
updated-dependencies:
- dependency-name: rack
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-13 11:28:41 +05:00
8468c87170 Merge remote-tracking branch 'remotes/origin/master' into develop 2023-03-08 13:14:15 +05:00
3427554bf0 Merge pull request #355 from ONLYOFFICE/fix/gitignore
chore: remove .gitignore from spring,ruby
2023-03-08 13:13:30 +05:00
ec2845af5e chore: remove .gitignore from spring,ruby 2023-03-06 12:27:58 +05:00
976dfc9276 Merge pull request #353 from ONLYOFFICE/feature/formats
Feature/formats
2023-03-06 10:45:39 +05:00
da7cc3e65d Merge pull request #344 from hunimuni/patch-1
Fixed links
2023-03-05 18:36:42 +05:00
3283e14c01 Merge pull request #354 from ONLYOFFICE/feature/artifact-actions
ci: artifact and release actions
2023-03-05 17:20:23 +05:00
17f336a156 ci: artifact and release actions 2023-03-03 18:11:58 +05:00
3d7ea8715a ruby: changed format list 2023-03-03 17:11:01 +05:00
487467cbed python: changed format list 2023-03-03 17:09:15 +05:00
cb71e3fb35 java-spring: changed format list 2023-03-03 16:57:35 +05:00
5749ad8db2 java: changed format list 2023-03-03 16:55:59 +05:00
f3d03c6011 csharp-mvc: changed format list 2023-03-03 16:53:56 +05:00
16b1a90cb1 csharp: changed format list 2023-03-03 16:51:47 +05:00
a29d98eb10 php: changed format list 2023-03-03 16:44:20 +05:00
82cb492bb7 python: unused import 2023-03-03 14:12:51 +05:00
6fde4de187 nodejs: changed format list 2023-03-03 01:12:05 +05:00
ad073bb2f8 Merge remote-tracking branch 'remotes/origin/master' into develop 2023-03-02 22:10:19 +05:00
827b315bff Merge pull request #345 from ONLYOFFICE/refactor/php-example-refactoring
Refactor/php example refactoring
2023-03-02 18:12:01 +05:00
33c093f7a6 Revert "fix: remove on develop pull request"
This reverts commit 2d9a7ed502.
2023-03-02 18:11:27 +05:00
855dfb4736 php: format 2023-03-02 18:09:10 +05:00
50eeaf0db4 php: formatting by linter 2023-03-02 15:16:25 +03:00
8d3afb7ad0 Merge branch 'develop' into refactor/php-example-refactoring 2023-03-02 14:10:32 +03:00
830fa87e27 fix reload page with cached checkbox status in FireFox 2023-03-02 14:35:54 +05:00
4d8a893326 Merge branch 'feature/wopi-mobile' into develop 2023-03-02 14:22:36 +05:00
7f371699b1 nodejs: remove empty media style 2023-03-02 14:22:20 +05:00
76a2bfd9f9 Margin of icons in WOPI-template. New actions included. (#351)
* nodejs: WOPI - margin of icons = 8px, media-queries changed.

* nodejs: WOPI - margin of icons for new actions.
2023-03-02 14:04:21 +05:00
9c88f86e80 Merge pull request #346 from ONLYOFFICE/feature/referenceData
Feature/reference data
2023-03-02 13:47:40 +05:00
4d4951f184 referenceData to changelog 2023-03-02 13:22:00 +05:00
251f48ee1e nodejs: do not check oform param in ie11 2023-02-28 17:40:37 +05:00
bdca343550 Copyright 2023 2023-02-28 12:26:45 +05:00
dcc7bdfcae nodejs: icons for mobile actions in wopi 2023-02-28 00:07:58 +05:00
469a8c087b Merge branch 'develop' into feature/referenceData 2023-02-27 10:17:41 +03:00
61a8490d4f csharp: check of empty filename-string (logical error fixed) 2023-02-27 10:10:37 +03:00
4fa2049adc csharp-mvc: names of helpers fixed + check of empty filename-string (logical error fixed) 2023-02-27 10:08:47 +03:00
060f28e404 csharp-mvc: unnecessary replace of symbols deleted 2023-02-27 09:30:44 +03:00
82bc0e6496 csharp: unnecessary replace of symbols deleted. 2023-02-27 09:25:32 +03:00
beaab91223 Merge pull request #350 from ONLYOFFICE/feature/permissions-protect-for-anonymous
Feature/permissions protect for anonymous
2023-02-23 17:44:30 +05:00
49953199d4 protect to changelog 2023-02-23 17:44:11 +05:00
9c7b39bd5a protect field to information 2023-02-23 17:43:09 +05:00
c2f653bbde nodejs: "protect" permission is added 2023-02-22 16:06:28 +03:00
d3d3121d51 java-spring: "protect" permission is added 2023-02-22 15:27:39 +03:00
ebd252f42c java: "protect" permission is added 2023-02-22 14:53:24 +03:00
586d7767b4 csharp-mvc: "protect" permission is added 2023-02-22 14:42:21 +03:00
ea8b0c0fa3 csharp: "protect" permission is added 2023-02-22 14:39:27 +03:00
055f548056 ruby: "protect" permission is added 2023-02-22 14:30:59 +03:00
78752275fd python: "protect" permission is added 2023-02-22 14:20:00 +03:00
c26a17f29e php: "protect" permission is added 2023-02-22 14:04:11 +03:00
61d64e909b java-spring: fix - search for filename by path 2023-02-22 12:22:41 +03:00
21d1fd962f java: fix - search for filename by path 2023-02-22 11:55:13 +03:00
4eff2e7d89 ruby: fix - search for filename by path 2023-02-21 11:49:42 +03:00
2b6b48720e python: apache 2 license 2023-02-21 11:56:15 +05:00
4f26ff64c6 csharp-mvc: fix - search for filename by path 2023-02-21 09:31:50 +03:00
d23e139272 csharp: fix - search for filename by path 2023-02-21 09:29:52 +03:00
e6ec9acc96 Merge pull request #349 from ONLYOFFICE/feature/python-licenses-list
python: licenses list added
2023-02-21 11:02:59 +05:00
9d54ec748a python: fix - search for filename by path 2023-02-20 17:06:56 +03:00
8d2cbca12f php: fix - search for filename by path 2023-02-20 16:49:44 +03:00
20c51ea577 python: licenses list added 2023-02-20 12:34:35 +03:00
23f2837c66 php: removed unused "use" statements 2023-02-17 16:05:45 +03:00
9faf540f8c php: docEditor template added 2023-02-17 15:44:48 +03:00
5bb8719e00 php: README.md updated 2023-02-17 15:44:21 +03:00
2bb01fbfff php: building an docEditorView from a templates + formatting by linter 2023-02-17 14:58:13 +03:00
de9f27465f Merge pull request #348 from ONLYOFFICE/feature/add-oform-parameter
nodejs: disable oform module
2023-02-17 16:10:02 +05:00
66ab02199b Merge pull request #347 from ONLYOFFICE/bugfix/wopi-language
nodejs: wopi: fix language
2023-02-17 16:02:16 +05:00
d77be1fcbd nodejs: wopi: refactor wopi params 2023-02-17 13:26:18 +03:00
e729afdd05 java-spring: search for fileName by path added + json-data fix 2023-02-17 12:59:09 +03:00
e88c2e9c68 java: search for fileName by path added + json-data fix 2023-02-17 12:20:25 +03:00
63b7641c47 csharp: fix - "Path not found" - error handled 2023-02-17 11:46:17 +03:00
54f501c82b csharp-mvc: search for fileName by path added 2023-02-17 11:43:15 +03:00
c291b1059c nodejs: wopi: fix language 2023-02-17 11:35:25 +03:00
ee0a167708 csharp: search for fileName by path added 2023-02-17 11:15:33 +03:00
f76c611033 ruby: search for fileName by path added 2023-02-17 10:40:03 +03:00
7d1c3a994d python: search for fileName by path added 2023-02-17 10:13:43 +03:00
42b7c8353e php: search for fileName by path added 2023-02-17 09:34:22 +03:00
584dd720de php: dictionary of templates names deleted 2023-02-16 16:21:37 +03:00
aa5d6fce47 php: common methods are collected in the parent class View, changed methods visibility 2023-02-16 16:17:35 +03:00
32c64daa4d php: building an IndexView from a templates 2023-02-16 15:55:20 +03:00
1b1d07ebc5 python: referenceData 2023-02-16 12:19:33 +03:00
55734a1458 ruby: referenceData 2023-02-16 10:10:23 +03:00
43875b06bf java-spring: ReferenceData 2023-02-15 15:33:07 +03:00
97ba0da3c2 java: referenceData 2023-02-15 14:54:12 +03:00
8147608d3b csharp-mvc: fix referenceData - path-parameter in ajax-handler added 2023-02-15 14:24:44 +03:00
9213143e14 chsarp: fix referenceData - path-parameter in ajax-handler added 2023-02-15 14:20:40 +03:00
f1a9a84777 php: new methods for views, IndexStoredListView added 2023-02-14 17:18:09 +03:00
75046b80c6 csharp-mvc: referenceData 2023-02-14 15:42:36 +03:00
69caf53646 csharp: referenceData 2023-02-14 15:20:27 +03:00
6f69350183 php: views-classes added 2023-02-13 16:30:00 +03:00
2e75037b4e php: referenceData 2023-02-13 14:56:09 +03:00
bba6473b95 Merge branch 'develop' into refactor/php-example-refactoring 2023-02-10 13:38:03 +03:00
2aaa32449a Merge pull request #341 from ONLYOFFICE/feature/config-request-jwt
Feature/config request jwt
2023-02-10 13:09:09 +03:00
1a44d6d415 token.useforrequest to changelog 2023-02-10 15:07:52 +05:00
7a3025c548 php: ajax-handlers transferred from functions.php to ajax.php 2023-02-10 11:33:02 +03:00
cdd816ef35 php: deleted declarations of variables without values 2023-02-10 09:33:04 +03:00
f69097b209 php: header comment fixed 2023-02-09 17:05:12 +03:00
9896be023e php: sendlog() returned into ExampleUsers 2023-02-09 16:01:43 +03:00
1d99c8f58e php: objects of helpers used instead of functions 2023-02-09 14:51:41 +03:00
835e10ed4b Fixed links
The paths were not formed correctly, the symbol '/' was missing
2023-02-09 13:41:48 +03:00
e4439bfc3e php: "\r\n" replaced with "\n" 2023-02-09 11:05:06 +03:00
5ad77a855b Merge remote-tracking branch 'remotes/origin/develop' into feature/config-request-jwt
# Conflicts:
#	web/documentserver-example/php/config.php
#	web/documentserver-example/php/functions.php
#	web/documentserver-example/php/jwtmanager.php
#	web/documentserver-example/php/trackmanager.php
2023-02-09 12:32:06 +05:00
37f49af588 Revert "php: PSR1.Files.SideEffects disabled in ruleset.xml"
This reverts commit b11a1be481.
2023-02-09 09:19:58 +03:00
f86c09b19d Merge branch 'refactor/linter-formatting' into refactor/php-example-refactoring 2023-02-09 09:18:16 +03:00
3112be387e php: helpers used in functions 2023-02-08 17:49:20 +03:00
383d7c27c0 php: helpers fixed 2023-02-08 16:50:47 +03:00
7190725726 php: TrackManager class added 2023-02-08 14:31:44 +03:00
065da92d65 php: FileUtility and Utils added 2023-02-08 12:33:43 +03:00
5c877cf902 php: classes JwtManager and ConfigManager used instead of included functions and GLOBALS array 2023-02-08 11:24:45 +03:00
726808813a php: config.json default values 2023-02-08 11:07:13 +03:00
7af4c16b35 php: JwtManager class added 2023-02-08 10:51:58 +03:00
e7fc9bb8c2 php: ConfigManager class added, config.json for ConfigManager added (instead of $GLOBALS array in future) 2023-02-08 10:36:43 +03:00
baf429a0d0 php: methods of ExampleUsers class used instead of functions 2023-02-07 16:44:46 +03:00
00b2d948dc php: class users converted to classes Users(user entity) and ExampleUsers(users-collection entity) 2023-02-07 16:37:21 +03:00
81258cc717 php: created parameters for composer autoloader 2023-02-07 16:34:37 +03:00
9db426ffe5 php: tokenUseForRequest() function used instead of $GLOBALS array value 2023-02-06 16:33:26 +03:00
a6ee7d28d0 php: added tokenUseForRequest() method into jwtmanager 2023-02-06 16:25:41 +03:00
7a50b8fda2 ruby: config request JWT used in functions 2023-02-06 16:14:53 +03:00
5f7f8d66d5 ruby: added use_for_request method into jwt_helper 2023-02-06 16:11:41 +03:00
d514acf32e python: config request JWT used in functions 2023-02-06 15:44:59 +03:00
d3df1499d2 python: added useForRequest() method into jwtManager 2023-02-06 15:37:29 +03:00
f7682b12ae java-spring: config request JWT used in functions 2023-02-06 15:22:06 +03:00
8c2d62d917 java-spring: added tokenUseForRequest method and field into DefaultJwtManager class and JwtManager interface 2023-02-06 15:10:47 +03:00
f0d9c54038 java: config request JWT used in functions 2023-02-06 14:52:33 +03:00
fbe5b1de37 java: added tokenUseForRequest methods into DocumentManager 2023-02-06 14:24:02 +03:00
dccfbb2edf csharp-mvc: config request JWT used in functions 2023-02-06 12:46:11 +03:00
0f2b5305e3 csharp-mvc: added SignatureUseForRequest field into JwtManager 2023-02-06 12:39:38 +03:00
c69a7c92a5 csharp: config request JWT used in functions 2023-02-06 12:30:43 +03:00
6fa3aab99c csharp: added SignatureUseForRequest field into JwtManager 2023-02-06 12:13:49 +03:00
02f4777058 php: config request JWT used in functions 2023-02-06 11:12:14 +03:00
66cbb64039 php: require user address on download
nodejs: require token on download
2023-02-01 15:00:10 +05:00
879ee1f750 java-spring: token and user address required on download 2023-02-01 15:00:10 +05:00
90449fff3a java: token and address required on download 2023-02-01 15:00:09 +05:00
893c6306f2 csharp-mvc: user address required on download 2023-02-01 15:00:09 +05:00
aa3806f1dd c-sharp: user address required on download 2023-02-01 15:00:09 +05:00
4000117811 ruby: user address required on download 2023-02-01 15:00:09 +05:00
3319e6428a python: user address required on download 2023-02-01 15:00:08 +05:00
290 changed files with 11250 additions and 63394 deletions

View File

@ -0,0 +1,33 @@
name: Artifact Csharp MVC
on:
workflow_dispatch:
push:
branches: [master, main]
paths: ['web/documentserver-example/csharp-mvc/**']
pull_request:
branches: [master, main]
paths: ['web/documentserver-example/csharp-mvc/**']
jobs:
artifact:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Build Artifact
run: |
cd ${{ github.workspace }}
cwd=$(pwd)
git submodule update --init --recursive
cd ./web/documentserver-example/csharp-mvc
mkdir -p ./deploy/'DotNet (Csharp MVN) Example'
rsync -av --exclude='deploy' ./ ./deploy/'DotNet (Csharp MVC) Example'
cd ./deploy/'DotNet (Csharp MVC) Example'/assets
rm -rf ./.git/
rm .git
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: DotNet.Csharp.MVC.Example
path: ${{ github.workspace }}/web/documentserver-example/csharp-mvc/deploy

33
.github/workflows/artifact-csharp.yml vendored Normal file
View File

@ -0,0 +1,33 @@
name: Artifact Csharp
on:
workflow_dispatch:
push:
branches: [master, main]
paths: ['web/documentserver-example/csharp/**']
pull_request:
branches: [master, main, develop]
paths: ['web/documentserver-example/csharp/**']
jobs:
artifact:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Build Artifact
run: |
cd ${{ github.workspace }}
cwd=$(pwd)
git submodule update --init --recursive
cd ./web/documentserver-example/csharp
mkdir -p ./deploy/'DotNet (Csharp) Example'
rsync -av --exclude='deploy' ./ ./deploy/'DotNet (Csharp) Example'
cd ./deploy/'DotNet (Csharp) Example'/assets
rm -rf ./.git/
rm .git
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: DotNet.Csharp.Example
path: ${{ github.workspace }}/web/documentserver-example/csharp/deploy

33
.github/workflows/artifact-java.yml vendored Normal file
View File

@ -0,0 +1,33 @@
name: Artifact Java
on:
workflow_dispatch:
push:
branches: [master, main]
paths: ['web/documentserver-example/java/**']
pull_request:
branches: [master, main]
paths: ['web/documentserver-example/java/**']
jobs:
artifact:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Build Artifact
run: |
cd ${{ github.workspace }}
cwd=$(pwd)
git submodule update --init --recursive
cd ./web/documentserver-example/java
mkdir -p ./deploy/'Java Example'
rsync -av --exclude='deploy' ./ ./deploy/'Java Example'
cd ./deploy/'Java Example'/src/main/resources/assets
rm -rf ./.git/
rm .git
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: Java.Example
path: ${{ github.workspace }}/web/documentserver-example/java/deploy

33
.github/workflows/artifact-node.yml vendored Normal file
View File

@ -0,0 +1,33 @@
name: Artifact Nodejs
on:
workflow_dispatch:
push:
branches: [master, main]
paths: ['web/documentserver-example/nodejs/**']
pull_request:
branches: [master, main]
paths: ['web/documentserver-example/nodejs/**']
jobs:
artifact:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Build Artifact
run: |
cd ${{ github.workspace }}
cwd=$(pwd)
git submodule update --init --recursive
cd ./web/documentserver-example/nodejs
mkdir -p ./deploy/'Node.js Example'
rsync -av --exclude='deploy' ./ ./deploy/'Node.js Example'
cd ./deploy/'Node.js Example'/public/assets
rm -rf ./.git/
rm .git
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: Node.js.Example
path: ${{ github.workspace }}/web/documentserver-example/nodejs/deploy

33
.github/workflows/artifact-php.yml vendored Normal file
View File

@ -0,0 +1,33 @@
name: Artifact PHP
on:
workflow_dispatch:
push:
branches: [master, main]
paths: ['web/documentserver-example/php/**']
pull_request:
branches: [master, main]
paths: ['web/documentserver-example/php/**']
jobs:
artifact:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Build Artifact
run: |
cd ${{ github.workspace }}
cwd=$(pwd)
git submodule update --init --recursive
cd ./web/documentserver-example/php
mkdir -p ./deploy/'PHP Example'
rsync -av --exclude='deploy' ./ ./deploy/'PHP Example'
cd ./deploy/'PHP Example'/assets
rm -rf ./.git/
rm .git
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: PHP.Example
path: ${{ github.workspace }}/web/documentserver-example/php/deploy

33
.github/workflows/artifact-python.yml vendored Normal file
View File

@ -0,0 +1,33 @@
name: Artifact Python
on:
workflow_dispatch:
push:
branches: [master, main]
paths: ['web/documentserver-example/python/**']
pull_request:
branches: [master, main]
paths: ['web/documentserver-example/python/**']
jobs:
artifact:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Build Artifact
run: |
cd ${{ github.workspace }}
cwd=$(pwd)
git submodule update --init --recursive
cd ./web/documentserver-example/python
mkdir -p ./deploy/'Python Example'
rsync -av --exclude='deploy' ./ ./deploy/'Python Example'
cd ./deploy/'Python Example'/assets
rm -rf ./.git/
rm .git
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: Python.Example
path: ${{ github.workspace }}/web/documentserver-example/python/deploy

33
.github/workflows/artifact-ruby.yml vendored Normal file
View File

@ -0,0 +1,33 @@
name: Artifact Ruby
on:
workflow_dispatch:
push:
branches: [master, main]
paths: ['web/documentserver-example/ruby/**']
pull_request:
branches: [master, main]
paths: ['web/documentserver-example/ruby/**']
jobs:
artifact:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Build Artifact
run: |
cd ${{ github.workspace }}
cwd=$(pwd)
git submodule update --init --recursive
cd ./web/documentserver-example/ruby
mkdir -p ./deploy/'Ruby Example'
rsync -av --exclude='deploy' ./ ./deploy/'Ruby Example'
cd ./deploy/'Ruby Example'/public/assets
rm -rf ./.git/
rm .git
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: Ruby.Example
path: ${{ github.workspace }}/web/documentserver-example/ruby/deploy

33
.github/workflows/artifact-spring.yml vendored Normal file
View File

@ -0,0 +1,33 @@
name: Artifact Java Spring
on:
workflow_dispatch:
push:
branches: [master, main]
paths: ['web/documentserver-example/java-spring/**']
pull_request:
branches: [master, main]
paths: ['web/documentserver-example/java-spring/**']
jobs:
artifact:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Build Artifact
run: |
cd ${{ github.workspace }}
cwd=$(pwd)
git submodule update --init --recursive
cd ./web/documentserver-example/java-spring
mkdir -p ./deploy/'Java Spring Example'
rsync -av --exclude='deploy' ./ ./deploy/'Java Spring Example'
cd ./deploy/'Java Spring Example'/src/main/resources/assets
rm -rf ./.git/
rm .git
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: Java.Spring.Example
path: ${{ github.workspace }}/web/documentserver-example/java-spring/deploy

View File

@ -6,7 +6,7 @@ on:
branches: [master, main]
paths: ['web/documentserver-example/java/**']
pull_request:
branches: [master, main]
branches: [master, main, develop]
paths: ['web/documentserver-example/java/**']
jobs:

View File

@ -6,7 +6,7 @@ on:
branches: [master, main]
paths: ['web/documentserver-example/nodejs/**']
pull_request:
branches: [master, main]
branches: [master, main, develop]
paths: ['web/documentserver-example/nodejs/**']
env:

View File

@ -6,7 +6,7 @@ on:
branches: [master, main]
paths: ['web/documentserver-example/php/**']
pull_request:
branches: [master, main]
branches: [master, main, develop]
paths: ['web/documentserver-example/php/**']
jobs:

View File

@ -6,7 +6,7 @@ on:
branches: [master, main]
paths: ['web/documentserver-example/python/**']
pull_request:
branches: [master, main]
branches: [master, main, develop]
paths: ['web/documentserver-example/python/**']
jobs:

View File

@ -6,7 +6,7 @@ on:
branches: [master, main]
paths: ['web/documentserver-example/ruby/**']
pull_request:
branches: [master, main]
branches: [master, main, develop]
paths: ['web/documentserver-example/ruby/**']
jobs:

View File

@ -6,7 +6,7 @@ on:
branches: [master, main]
paths: ['web/documentserver-example/java-spring/**']
pull_request:
branches: [master, main]
branches: [master, main, develop]
paths: ['web/documentserver-example/java-spring/**']
jobs:

146
.github/workflows/release.yml vendored Normal file
View File

@ -0,0 +1,146 @@
name: Release
on:
push:
branches: [master,main]
permissions:
contents: write
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Install Zip
run: sudo apt-get install zip
- name: Get Info
run: |
echo "version=$(grep -Eo '[0-9]+(\.[0-9]+)+' CHANGELOG.md | head -n 1)" >> $GITHUB_OUTPUT
id: info
- name: Generate Changelog
run: |
awk '/## [0-9]/{p++} p; /## [0-9]/{if (p > 1) exit}' CHANGELOG.md | awk 'NR>2 {print last} {last=$0}' > RELEASE.md
- name: Build Csharp MVC Artifact
run: |
cd ${{ github.workspace }}
cwd=$(pwd)
git submodule update --init --recursive
cd ./web/documentserver-example/csharp-mvc
mkdir -p ./'DotNet (Csharp MVC) Example'
rsync -av --exclude='DotNet (Csharp MVC) Example' ./ ./'DotNet (Csharp MVC) Example'
cd ./'DotNet (Csharp MVC) Example'/assets
rm -rf ./.git/
rm .git
- name: Build Csharp Artifact
run: |
cd ${{ github.workspace }}
cwd=$(pwd)
git submodule update --init --recursive
cd ./web/documentserver-example/csharp
mkdir -p ./'DotNet (Csharp) Example'
rsync -av --exclude='DotNet (Csharp) Example' ./ ./'DotNet (Csharp) Example'
cd ./'DotNet (Csharp) Example'/assets
rm -rf ./.git/
rm .git
- name: Build Java Artifact
run: |
cd ${{ github.workspace }}
cwd=$(pwd)
git submodule update --init --recursive
cd ./web/documentserver-example/java
mkdir -p ./'Java Example'
rsync -av --exclude='Java Example' ./ ./'Java Example'
cd ./'Java Example'/src/main/resources/assets
rm -rf ./.git/
rm .git
- name: Build Nodejs Artifact
run: |
cd ${{ github.workspace }}
cwd=$(pwd)
git submodule update --init --recursive
cd ./web/documentserver-example/nodejs
mkdir -p ./'Node.js Example'
rsync -av --exclude='Node.js Example' ./ ./'Node.js Example'
cd ./'Node.js Example'/public/assets
rm -rf ./.git/
rm .git
- name: Build PHP Artifact
run: |
cd ${{ github.workspace }}
cwd=$(pwd)
git submodule update --init --recursive
cd ./web/documentserver-example/php
mkdir -p ./'PHP Example'
rsync -av --exclude='PHP Example' ./ ./'PHP Example'
cd ./'PHP Example'/assets
rm -rf ./.git/
rm .git
- name: Build Python Artifact
run: |
cd ${{ github.workspace }}
cwd=$(pwd)
git submodule update --init --recursive
cd ./web/documentserver-example/python
mkdir -p ./'Python Example'
rsync -av --exclude='Python Example' ./ ./'Python Example'
cd ./'Python Example'/assets
rm -rf ./.git/
rm .git
- name: Build Ruby Artifact
run: |
cd ${{ github.workspace }}
cwd=$(pwd)
git submodule update --init --recursive
cd ./web/documentserver-example/ruby
mkdir -p ./'Ruby Example'
rsync -av --exclude='Ruby Example' ./ ./'Ruby Example'
cd ./'Ruby Example'/public/assets
rm -rf ./.git/
rm .git
- name: Build Spring Artifact
run: |
cd ${{ github.workspace }}
cwd=$(pwd)
git submodule update --init --recursive
cd ./web/documentserver-example/java-spring
mkdir -p ./'Java Spring Example'
rsync -av --exclude='Java Spring Example' ./ ./'Java Spring Example'
cd ./'Java Spring Example'/src/main/resources/assets
rm -rf ./.git/
rm .git
- name: Pack Artifacts
run: |
cd ${{ github.workspace }}/web/documentserver-example/csharp-mvc
zip -r DotNet.Csharp.MVC.Example.zip ./'DotNet (Csharp MVC) Example'
cd ${{ github.workspace }}/web/documentserver-example/csharp
zip -r DotNet.Csharp.Example.zip ./'DotNet (Csharp) Example'
cd ${{ github.workspace }}/web/documentserver-example/java
zip -r Java.Example.zip ./'Java Example'
cd ${{ github.workspace }}/web/documentserver-example/nodejs
zip -r Node.js.Example.zip ./'Node.js Example'
cd ${{ github.workspace }}/web/documentserver-example/php
zip -r PHP.Example.zip ./'PHP Example'
cd ${{ github.workspace }}/web/documentserver-example/python
zip -r Python.Example.zip ./'Python Example'
cd ${{ github.workspace }}/web/documentserver-example/ruby
zip -r Ruby.Example.zip ./'Ruby Example'
cd ${{ github.workspace }}/web/documentserver-example/java-spring
zip -r Java.Spring.Example.zip ./'Java Spring Example'
- name: Create Release
uses: ncipollo/release-action@v1
id: create_release
with:
bodyFile: RELEASE.md
artifacts: "
${{ github.workspace }}/web/documentserver-example/csharp-mvc/DotNet.Csharp.MVC.Example.zip,
${{ github.workspace }}/web/documentserver-example/csharp/DotNet.Csharp.Example.zip,
${{ github.workspace }}/web/documentserver-example/java/Java.Example.zip,
${{ github.workspace }}/web/documentserver-example/nodejs/Node.js.Example.zip,
${{ github.workspace }}/web/documentserver-example/php/PHP.Example.zip,
${{ github.workspace }}/web/documentserver-example/python/Python.Example.zip,
${{ github.workspace }}/web/documentserver-example/ruby/Ruby.Example.zip,
${{ github.workspace }}/web/documentserver-example/java-spring/Java.Spring.Example.zip
"
tag: v${{ steps.info.outputs.version }}

8
.gitignore vendored
View File

@ -11,6 +11,14 @@
**/.vscode/
**/.vs/
**/.idea
.classpath
.project
.settings/
*.iml
*.iws
.DS_Store
/web/documentserver-example/java/target/
/web/documentserver-example/java-spring/target/
/web/documentserver-example/csharp/packages
/web/documentserver-example/csharp-mvc/packages
/web/documentserver-example/java-spring/documents/

24
.gitmodules vendored
View File

@ -1,15 +1,7 @@
[submodule "web/documentserver-example/nodejs/public/assets"]
path = web/documentserver-example/nodejs/public/assets
url = https://github.com/ONLYOFFICE/document-templates
branch = main/en
[submodule "web/documentserver-example/java/src/main/resources/assets"]
path = web/documentserver-example/java/src/main/resources/assets
url = https://github.com/ONLYOFFICE/document-templates
branch = main/en
[submodule "web/documentserver-example/php/assets"]
path = web/documentserver-example/php/assets
url = https://github.com/ONLYOFFICE/document-templates
branch = main/en
[submodule "web/documentserver-example/python/assets"]
path = web/documentserver-example/python/assets
url = https://github.com/ONLYOFFICE/document-templates
@ -30,3 +22,19 @@
path = web/documentserver-example/java-spring/src/main/resources/assets
url = https://github.com/ONLYOFFICE/document-templates
branch = main/en
[submodule "web/documentserver-example/nodejs/public/assets/document-templates"]
path = web/documentserver-example/nodejs/public/assets/document-templates
url = https://github.com/ONLYOFFICE/document-templates
branch = main/en
[submodule "web/documentserver-example/nodejs/public/assets/document-formats"]
path = web/documentserver-example/nodejs/public/assets/document-formats
url = https://github.com/ONLYOFFICE/document-formats
branch = master
[submodule "web/documentserver-example/php/assets/document-templates"]
path = web/documentserver-example/php/assets/document-templates
url = https://github.com/ONLYOFFICE/document-templates
branch = main/en
[submodule "web/documentserver-example/php/assets/document-formats"]
path = web/documentserver-example/php/assets/document-formats
url = https://github.com/ONLYOFFICE/document-formats
branch = master

View File

@ -3,10 +3,6 @@ Document Server integration example uses code from the following 3rd party proje
web/documentserver-example/csharp
jQuery - jQuery is a new kind of JavaScript Library. jQuery is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development. jQuery is designed to change the way that you write JavaScript. NOTE: This package is maintained on behalf of the library owners by the NuGet Community Packages project at https://nugetpackages.codeplex.com/ (https://jquery.org/license/)
License: MIT
License File: jQuery.license
jQuery.BlockUI - The jQuery BlockUI Plugin lets you simulate synchronous behavior when using AJAX, without locking the browser. (https://github.com/malsup/blockui/)
License: MIT, GPL
License File: jQuery.BlockUI.license
@ -19,10 +15,26 @@ jQuery.iframe-transport - jQuery Iframe Transport Plugin for File Upload (https:
License: MIT
License File: jQuery.iframe-transport.license
jQuery - jQuery is a new kind of JavaScript Library. jQuery is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development. jQuery is designed to change the way that you write JavaScript. NOTE: This package is maintained on behalf of the library owners by the NuGet Community Packages project at https://nugetpackages.codeplex.com/ (https://jquery.org/license/)
License: MIT
License File: jQuery.license
jQuery.Migrate - Upgrading libraries such as jQuery can be a lot of work, when breaking changes have been introduced. jQuery Migrate makes this easier, by restoring the APIs that were removed, and additionally shows warnings in the browser console (development version of jQuery Migrate only) when removed and/or deprecated APIs are used. (https://github.com/jquery/jquery-migrate/blob/main/LICENSE.txt)
License: OpenJS
License File: jQuery.Migrate.license
jQuery.UI - jQuery UI is an open source library of interface components — interactions, full-featured widgets, and animation effects — based on the stellar jQuery javascript library . Each component is built according to jQuery's event-driven architecture (find something, manipulate it) and is themeable, making it easy for developers of any skill level to integrate and extend into their own code. (https://jquery.org/license/)
License: MIT
License File: jQuery.UI.license
JWT - JWT (JSON Web Token) Implementation for .NET (Public Domain) (https://github.com/jwt-dotnet/jwt/)
License: MIT
License File: JWT.license
Newtonsoft.Json - Json.NET is a popular high-performance JSON framework for .NET (https://github.com/JamesNK/Newtonsoft.Json)
License: MIT
License File: Newtonsoft.Json.license
web/documentserver-example/csharp-mvc
@ -30,10 +42,6 @@ Entity Framework - Entity Framework is an object-relational mapper that enables
License: MICROSOFT SOFTWARE SUPPLEMENTAL TERMS, MICROSOFT SOFTWARE LICENSE TERMS
License File: EntityFramework.license
jQuery - jQuery is a new kind of JavaScript Library. jQuery is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development. jQuery is designed to change the way that you write JavaScript. NOTE: This package is maintained on behalf of the library owners by the NuGet Community Packages project at https://nugetpackages.codeplex.com/ (https://jquery.org/license/)
License: MIT
License File: jQuery.license
jQuery.BlockUI - The jQuery BlockUI Plugin lets you simulate synchronous behavior when using AJAX, without locking the browser. (https://github.com/malsup/blockui/)
License: MIT, GPL
License File: jQuery.BlockUI.license
@ -46,15 +54,27 @@ jQuery.iframe-transport - jQuery Iframe Transport Plugin for File Upload (https:
License: MIT
License File: jQuery.iframe-transport.license
jQuery - jQuery is a new kind of JavaScript Library. jQuery is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development. jQuery is designed to change the way that you write JavaScript. NOTE: This package is maintained on behalf of the library owners by the NuGet Community Packages project at https://nugetpackages.codeplex.com/ (https://jquery.org/license/)
License: MIT
License File: jQuery.license
jQuery.Migrate - Upgrading libraries such as jQuery can be a lot of work, when breaking changes have been introduced. jQuery Migrate makes this easier, by restoring the APIs that were removed, and additionally shows warnings in the browser console (development version of jQuery Migrate only) when removed and/or deprecated APIs are used. (https://github.com/jquery/jquery-migrate/blob/main/LICENSE.txt)
License: OpenJS
License File: jQuery.Migrate.license
jQuery.UI - jQuery UI is an open source library of interface components — interactions, full-featured widgets, and animation effects — based on the stellar jQuery javascript library . Each component is built according to jQuery's event-driven architecture (find something, manipulate it) and is themeable, making it easy for developers of any skill level to integrate and extend into their own code. (https://jquery.org/license/)
License: MIT
License File: jQuery.UI.license
JWT - JWT (JSON Web Token) Implementation for .NET (Public Domain) (https://github.com/jwt-dotnet/jwt/)
License: MIT
License File: JWT.license
Microsoft.Web.Infrastructure - This package contains the Microsoft.Web.Infrastructure assembly that lets you dynamically register HTTP modules at run time. (https://www.microsoft.com/web/webpi/eula/aspnetmvc3update-eula.htm)
License: MS-EULA License
License File: Microsoft.Web.Infrastructure.license
Newtonsoft.Json - Json.NET is a popular high-performance JSON framework for .NET (https://licenses.nuget.org/MIT)
Newtonsoft.Json - Json.NET is a popular high-performance JSON framework for .NET (https://github.com/JamesNK/Newtonsoft.Json)
License: MIT
License File: Newtonsoft.Json.license
@ -65,10 +85,6 @@ License File: WebGrease.license
web/documentserver-example/java
jQuery - jQuery is a new kind of JavaScript Library. jQuery is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development. jQuery is designed to change the way that you write JavaScript. NOTE: This package is maintained on behalf of the library owners by the NuGet Community Packages project at https://nugetpackages.codeplex.com/ (https://jquery.org/license/)
License: MIT
License File: jQuery.license
jQuery.BlockUI - The jQuery BlockUI Plugin lets you simulate synchronous behavior when using AJAX, without locking the browser. (https://github.com/malsup/blockui/)
License: MIT, GPL
License File: jQuery.BlockUI.license
@ -81,6 +97,14 @@ jQuery.iframe-transport - jQuery Iframe Transport Plugin for File Upload (https:
License: MIT
License File: jQuery.iframe-transport.license
jQuery - jQuery is a new kind of JavaScript Library. jQuery is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development. jQuery is designed to change the way that you write JavaScript. NOTE: This package is maintained on behalf of the library owners by the NuGet Community Packages project at https://nugetpackages.codeplex.com/ (https://jquery.org/license/)
License: MIT
License File: jQuery.license
jQuery.Migrate - Upgrading libraries such as jQuery can be a lot of work, when breaking changes have been introduced. jQuery Migrate makes this easier, by restoring the APIs that were removed, and additionally shows warnings in the browser console (development version of jQuery Migrate only) when removed and/or deprecated APIs are used. (https://github.com/jquery/jquery-migrate/blob/main/LICENSE.txt)
License: OpenJS
License File: jQuery.Migrate.license
jQuery.UI - jQuery UI is an open source library of interface components — interactions, full-featured widgets, and animation effects — based on the stellar jQuery javascript library . Each component is built according to jQuery's event-driven architecture (find something, manipulate it) and is themeable, making it easy for developers of any skill level to integrate and extend into their own code. (https://jquery.org/license/)
License: MIT
License File: jQuery.UI.license
@ -92,9 +116,17 @@ License File: prime-jwt.license
web/documentserver-example/java-spring
jQuery - jQuery is a new kind of JavaScript Library. jQuery is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development. jQuery is designed to change the way that you write JavaScript. NOTE: This package is maintained on behalf of the library owners by the NuGet Community Packages project at https://nugetpackages.codeplex.com/ (https://jquery.org/license/)
License: MIT
License File: jQuery.license
Gson - Gson is a Java library that can be used to convert Java Objects into their JSON representation. (https://github.com/google/gson/blob/master/LICENSE)
License: Apache 2.0
License File: gson.license
H2 Database Engine - This software contains unmodified binary redistributions for H2 database engine. H2 is a relational DBMS that can be embedded in java applications. (https://h2database.com/html/license.html)
License: MPL 2.0 or EPL 1.0
License File: h2database.license
Jackson Databind - General-purpose data-binding functionality and tree-model for Jackson Data Processor. (https://github.com/FasterXML/jackson-databind/blob/master/LICENSE)
License: Apache 2.0
License File: jackson-databind.license
jQuery.BlockUI - The jQuery BlockUI Plugin lets you simulate synchronous behavior when using AJAX, without locking the browser. (https://github.com/malsup/blockui/)
License: MIT, GPL
@ -108,10 +140,30 @@ jQuery.iframe-transport - jQuery Iframe Transport Plugin for File Upload (https:
License: MIT
License File: jQuery.iframe-transport.license
jQuery - jQuery is a new kind of JavaScript Library. jQuery is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development. jQuery is designed to change the way that you write JavaScript. NOTE: This package is maintained on behalf of the library owners by the NuGet Community Packages project at https://nugetpackages.codeplex.com/ (https://jquery.org/license/)
License: MIT
License File: jQuery.license
jQuery.Migrate - Upgrading libraries such as jQuery can be a lot of work, when breaking changes have been introduced. jQuery Migrate makes this easier, by restoring the APIs that were removed, and additionally shows warnings in the browser console (development version of jQuery Migrate only) when removed and/or deprecated APIs are used. (https://github.com/jquery/jquery-migrate/blob/main/LICENSE.txt)
License: OpenJS
License File: jQuery.Migrate.license
jQuery.UI - jQuery UI is an open source library of interface components — interactions, full-featured widgets, and animation effects — based on the stellar jQuery javascript library . Each component is built according to jQuery's event-driven architecture (find something, manipulate it) and is themeable, making it easy for developers of any skill level to integrate and extend into their own code. (https://jquery.org/license/)
License: MIT
License File: jQuery.UI.license
JSON.simple - JSON.simple is a simple Java toolkit for JSON. You can use JSON.simple to encode or decode JSON text. (https://github.com/fangyidong/json-simple/blob/master/LICENSE.txt)
License: Apache 2.0
License File: JSON.simple.license
Project Lombok - Project Lombok is a java library that automatically plugs into your editor and build tools. (https://mvnrepository.com/artifact/org.projectlombok/lombok).
License: MIT
License File lombok.license
ModelMapper - ModelMapper is an intelligent object mapping library that automatically maps objects to each other. (https://github.com/modelmapper/modelmapper)
License: Apache 2.0
License File modelmapper.license
Prime JWT - is intended to be fast and easy to use. Prime JWT has a single external dependency on Jackson. (https://github.com/ws-apps/prime-jwt/blob/master/LICENSE)
License: Apache 2.0
License File: prime-jwt.license
@ -132,22 +184,6 @@ Spring Data JPA - Persist data in SQL stores with Java Persistence API using Spr
License: Apache 2.0
License File: spring-data-jpa.license
H2 Database Engine - This software contains unmodified binary redistributions for H2 database engine. H2 is a relational DBMS that can be embedded in java applications. (https://h2database.com/html/license.html)
License: MPL 2.0 or EPL 1.0
License File: h2database.license
JSON.simple - JSON.simple is a simple Java toolkit for JSON. You can use JSON.simple to encode or decode JSON text. (https://github.com/fangyidong/json-simple/blob/master/LICENSE.txt)
License: Apache 2.0
License File: JSON.simple.license
Gson - Gson is a Java library that can be used to convert Java Objects into their JSON representation. (https://github.com/google/gson/blob/master/LICENSE)
License: Apache 2.0
License File: gson.license
Jackson Databind - General-purpose data-binding functionality and tree-model for Jackson Data Processor. (https://github.com/FasterXML/jackson-databind/blob/master/LICENSE)
License: Apache 2.0
License File: jackson-databind.license
web/documentserver-example/nodejs
@ -183,10 +219,6 @@ he - a robust HTML entity encoder/decoder written in JavaScript. (htt
License: MIT
License File: he.license
jQuery - jQuery is a new kind of JavaScript Library. jQuery is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development. jQuery is designed to change the way that you write JavaScript. NOTE: This package is maintained on behalf of the library owners by the NuGet Community Packages project at https://nugetpackages.codeplex.com/ (https://jquery.org/license/)
License: MIT
License File: jQuery.license
jQuery.BlockUI - The jQuery BlockUI Plugin lets you simulate synchronous behavior when using AJAX, without locking the browser. (https://github.com/malsup/blockui/)
License: MIT, GPL
License File: jQuery.BlockUI.license
@ -199,6 +231,14 @@ jQuery.iframe-transport - jQuery Iframe Transport Plugin for File Upload (https:
License: MIT
License File: jQuery.iframe-transport.license
jQuery - jQuery is a new kind of JavaScript Library. jQuery is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development. jQuery is designed to change the way that you write JavaScript. NOTE: This package is maintained on behalf of the library owners by the NuGet Community Packages project at https://nugetpackages.codeplex.com/ (https://jquery.org/license/)
License: MIT
License File: jQuery.license
jQuery.Migrate - Upgrading libraries such as jQuery can be a lot of work, when breaking changes have been introduced. jQuery Migrate makes this easier, by restoring the APIs that were removed, and additionally shows warnings in the browser console (development version of jQuery Migrate only) when removed and/or deprecated APIs are used. (https://github.com/jquery/jquery-migrate/blob/main/LICENSE.txt)
License: OpenJS
License File: jQuery.Migrate.license
jQuery.UI - jQuery UI is an open source library of interface components — interactions, full-featured widgets, and animation effects — based on the stellar jQuery javascript library . Each component is built according to jQuery's event-driven architecture (find something, manipulate it) and is themeable, making it easy for developers of any skill level to integrate and extend into their own code. (https://jquery.org/license/)
License: MIT
License File: jQuery.UI.license
@ -228,11 +268,8 @@ License: MIT
License File: urllib.license
web/documentserver-example/php
jQuery - jQuery is a new kind of JavaScript Library. jQuery is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development. jQuery is designed to change the way that you write JavaScript. NOTE: This package is maintained on behalf of the library owners by the NuGet Community Packages project at https://nugetpackages.codeplex.com/ (https://jquery.org/license/)
License: MIT
License File: jQuery.license
web/documentserver-example/php
jQuery.BlockUI - The jQuery BlockUI Plugin lets you simulate synchronous behavior when using AJAX, without locking the browser. (https://github.com/malsup/blockui/)
License: MIT, GPL
@ -246,6 +283,14 @@ jQuery.iframe-transport - jQuery Iframe Transport Plugin for File Upload (https:
License: MIT
License File: jQuery.iframe-transport.license
jQuery - jQuery is a new kind of JavaScript Library. jQuery is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development. jQuery is designed to change the way that you write JavaScript. NOTE: This package is maintained on behalf of the library owners by the NuGet Community Packages project at https://nugetpackages.codeplex.com/ (https://jquery.org/license/)
License: MIT
License File: jQuery.license
jQuery.Migrate - Upgrading libraries such as jQuery can be a lot of work, when breaking changes have been introduced. jQuery Migrate makes this easier, by restoring the APIs that were removed, and additionally shows warnings in the browser console (development version of jQuery Migrate only) when removed and/or deprecated APIs are used. (https://github.com/jquery/jquery-migrate/blob/main/LICENSE.txt)
License: OpenJS
License File: jQuery.Migrate.license
jQuery.UI - jQuery UI is an open source library of interface components — interactions, full-featured widgets, and animation effects — based on the stellar jQuery javascript library . Each component is built according to jQuery's event-driven architecture (find something, manipulate it) and is themeable, making it easy for developers of any skill level to integrate and extend into their own code. (https://jquery.org/license/)
License: MIT
License File: jQuery.UI.license
@ -259,23 +304,19 @@ License: BSD-3-Clause
License File: PHP_CodeSniffer.license
web/documentserver-example/ruby
web/documentserver-example/python
byebug - Byebug is a Ruby debugger. (https://github.com/deivid-rodriguez/byebug/blob/master/LICENSE)
License: BSD-2-Clause
License File: byebug.license
coffee-rails - CoffeeScript adapter for the Rails asset pipeline. (https://github.com/rails/coffee-rails/blob/master/MIT-LICENSE)
django-stubs - PEP-484 stubs for Django. (https://github.com/typeddjango/django-stubs/blob/master/LICENSE.md)
License: MIT
License File: coffee-rails.license
License File: django-stubs.license
jbuilder - Create JSON structures via a Builder-style DSL (https://github.com/rails/jbuilder/blob/master/MIT-LICENSE)
License: MIT
License File: jbuilder.license
Django - Django is a high-level Python web framework that encourages rapid development and clean, pragmatic design. Thanks for checking it out. (https://github.com/django/django/blob/main/LICENSE)
License: BSD-3-Clause
License File: Django.license
jQuery - jQuery is a new kind of JavaScript Library. jQuery is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development. jQuery is designed to change the way that you write JavaScript. NOTE: This package is maintained on behalf of the library owners by the NuGet Community Packages project at https://nugetpackages.codeplex.com/ (https://jquery.org/license/)
flake8 - flake8 is a python tool that glues together pycodestyle, pyflakes, mccabe, and third-party plugins to check the style and quality of some python code. (https://github.com/PyCQA/flake8/blob/main/LICENSE)
License: MIT
License File: jQuery.license
License File: flake8.license
jQuery.BlockUI - The jQuery BlockUI Plugin lets you simulate synchronous behavior when using AJAX, without locking the browser. (https://github.com/malsup/blockui/)
License: MIT, GPL
@ -289,6 +330,77 @@ jQuery.iframe-transport - jQuery Iframe Transport Plugin for File Upload (https:
License: MIT
License File: jQuery.iframe-transport.license
jQuery - jQuery is a new kind of JavaScript Library. jQuery is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development. jQuery is designed to change the way that you write JavaScript. NOTE: This package is maintained on behalf of the library owners by the NuGet Community Packages project at https://nugetpackages.codeplex.com/ (https://jquery.org/license/)
License: MIT
License File: jQuery.license
jQuery.Migrate - Upgrading libraries such as jQuery can be a lot of work, when breaking changes have been introduced. jQuery Migrate makes this easier, by restoring the APIs that were removed, and additionally shows warnings in the browser console (development version of jQuery Migrate only) when removed and/or deprecated APIs are used. (https://github.com/jquery/jquery-migrate/blob/main/LICENSE.txt)
License: OpenJS
License File: jQuery.Migrate.license
jQuery.UI - jQuery UI is an open source library of interface components — interactions, full-featured widgets, and animation effects — based on the stellar jQuery javascript library . Each component is built according to jQuery's event-driven architecture (find something, manipulate it) and is themeable, making it easy for developers of any skill level to integrate and extend into their own code. (https://jquery.org/license/)
License: MIT
License File: jQuery.UI.license
mypy - Optional static typing for Python. (https://github.com/python/mypy/blob/master/LICENSE)
License: MIT
License File: mypy.license
PyJWT - A Python implementation of RFC 7519. (https://github.com/jpadilla/pyjwt/blob/master/LICENSE)
License: MIT
License File: PyJWT.license
python-magic - python-magic is a Python interface to the libmagic file type identification library. (https://github.com/ahupp/python-magic/blob/master/LICENSE)
License: MIT
License File: python-magic.license
requests - Requests allows you to send HTTP/1.1 requests extremely easily. Theres no need to manually add query strings to your URLs, or to form-encode your PUT & POST data — but nowadays, just use the json method! (https://github.com/psf/requests/blob/main/LICENSE)
License: Apache 2.0
License File: requests.license
typeshed - Collection of library stubs for Python, with static types. (https://github.com/python/typeshed/blob/main/LICENSE)
License: Apache 2.0
License File: typeshed.license
web/documentserver-example/ruby
byebug - Byebug is a Ruby debugger. (https://github.com/deivid-rodriguez/byebug/blob/master/LICENSE)
License: BSD-2-Clause
License File: byebug.license
coffee-rails - CoffeeScript adapter for the Rails asset pipeline. (https://github.com/rails/coffee-rails/blob/master/MIT-LICENSE)
License: MIT
License File: coffee-rails.license
dalli - High performance memcached client for Ruby. (https://github.com/petergoldstein/dalli/blob/v3.2.0/LICENSE)
License: MIT
License File: dalli.license
jbuilder - Create JSON structures via a Builder-style DSL (https://github.com/rails/jbuilder/blob/master/MIT-LICENSE)
License: MIT
License File: jbuilder.license
jQuery.BlockUI - The jQuery BlockUI Plugin lets you simulate synchronous behavior when using AJAX, without locking the browser. (https://github.com/malsup/blockui/)
License: MIT, GPL
License File: jQuery.BlockUI.license
jQuery.FileUpload - File Upload widget with multiple file selection, drag&drop support, progress bar, validation and preview images, audio and video for jQuery. Supports cross-domain, chunked and resumable file uploads. Works with any server-side platform (Google App Engine, PHP, Python, Ruby on Rails, Java, etc.) that supports standard HTML form file uploads. (https://github.com/blueimp/jQuery-File-Upload/blob/master/LICENSE.txt)
License: MIT
License File: jQuery.FileUpload.license
jQuery.iframe-transport - jQuery Iframe Transport Plugin for File Upload (https://github.com/blueimp/jQuery-File-Upload/blob/master/LICENSE.txt)
License: MIT
License File: jQuery.iframe-transport.license
jQuery - jQuery is a new kind of JavaScript Library. jQuery is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development. jQuery is designed to change the way that you write JavaScript. NOTE: This package is maintained on behalf of the library owners by the NuGet Community Packages project at https://nugetpackages.codeplex.com/ (https://jquery.org/license/)
License: MIT
License File: jQuery.license
jQuery.Migrate - Upgrading libraries such as jQuery can be a lot of work, when breaking changes have been introduced. jQuery Migrate makes this easier, by restoring the APIs that were removed, and additionally shows warnings in the browser console (development version of jQuery Migrate only) when removed and/or deprecated APIs are used. (https://github.com/jquery/jquery-migrate/blob/main/LICENSE.txt)
License: OpenJS
License File: jQuery.Migrate.license
jQuery.UI - jQuery UI is an open source library of interface components — interactions, full-featured widgets, and animation effects — based on the stellar jQuery javascript library . Each component is built according to jQuery's event-driven architecture (find something, manipulate it) and is themeable, making it easy for developers of any skill level to integrate and extend into their own code. (https://jquery.org/license/)
License: MIT
License File: jQuery.UI.license
@ -297,10 +409,18 @@ jquery-rails - This gem provides jQuery and the jQuery-ujs driver for your Rail
License: MIT
License File: jquery-rails.license
mimemagic - А library to detect the mime type of a file by extension or by content. (https://github.com/mimemagicrb/mimemagic/blob/master/LICENSE)
License: MIT
License File: mimemagic.license
rails - Rails is a web-application framework that includes everything needed to create database-backed web applications according to the Model-View-Controller (MVC) pattern. (https://github.com/rails/rails/blob/v6.0.3.2/MIT-LICENSE)
License: MIT
License File: rails.license
rubocop - A Ruby static code analyzer and formatter, based on the community Ruby style guide. (https://github.com/rubocop/rubocop/blob/v1.52.0/LICENSE.txt)
License: MIT
License File: rubocop.license
sass-rails - This gem provides official integration for Ruby on Rails projects with the Sass stylesheet language. (https://github.com/rails/sass-rails/blob/master/MIT-LICENSE)
License: MIT
License File: sass-rails.license
@ -309,9 +429,13 @@ sdoc - rdoc generator html with javascript search index. (https://githu
License: MIT
License File: sdoc.license
sqlite3 - This module allows Ruby programs to interface with the SQLite3 database engine (www.sqlite.org). (https://github.com/sparklemotion/sqlite3-ruby/blob/master/LICENSE)
License: BSD-3-Clause
License File: sqlite3.license
sorbet - A fast, powerful type checker designed for Ruby. (https://github.com/sorbet/sorbet/blob/0.5.10871.20230607144259-d9000e2ba/LICENSE)
License: Apache License 2.0
License File: sorbet.license
tapioca - The swiss army knife of RBI generation. (https://github.com/Shopify/tapioca/blob/v0.11.6/LICENSE.txt)
License: MIT
License File: tapioca.license
turbolinks - Rails engine for Turbolinks 5 support (https://github.com/turbolinks/turbolinks-rails/blob/master/LICENSE)
License: MIT

View File

@ -1,6 +1,27 @@
# Change Log
- nodejs: change reference source
- php: using a repo with a list of formats
- nodejs: using a repo with a list of formats
- nodejs: delete file without reloading the page
- nodejs: getting history by a separate request
- nodejs: restore from history
## 1.6.0
- nodejs: setUsers for region protection
- si skin languages
- fix "no" skin languages
- anonymous can't change viewer to edit
- referenceData
- anonymous can't protect file
- separate setting for checking the token in requests
- php: linter refactoring
- horizontal scroll fix for Internet Explorer
- save file with extension from response after conversation
- conversation to ooxml
## 1.5.1
- update jquery
## 1.5.0
- nodejs: added wopi putRelativeFile action

View File

@ -4,10 +4,6 @@ Entity Framework - Entity Framework is an object-relational mapper that enables
License: MICROSOFT SOFTWARE SUPPLEMENTAL TERMS, MICROSOFT SOFTWARE LICENSE TERMS
License File: EntityFramework.license
jQuery - jQuery is a new kind of JavaScript Library. jQuery is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development. jQuery is designed to change the way that you write JavaScript. NOTE: This package is maintained on behalf of the library owners by the NuGet Community Packages project at https://nugetpackages.codeplex.com/ (https://jquery.org/license/)
License: MIT
License File: jQuery.license
jQuery.BlockUI - The jQuery BlockUI Plugin lets you simulate synchronous behavior when using AJAX, without locking the browser. (https://github.com/malsup/blockui/)
License: MIT, GPL
License File: jQuery.BlockUI.license
@ -20,6 +16,14 @@ jQuery.iframe-transport - jQuery Iframe Transport Plugin for File Upload (https:
License: MIT
License File: jQuery.iframe-transport.license
jQuery - jQuery is a new kind of JavaScript Library. jQuery is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development. jQuery is designed to change the way that you write JavaScript. NOTE: This package is maintained on behalf of the library owners by the NuGet Community Packages project at https://nugetpackages.codeplex.com/ (https://jquery.org/license/)
License: MIT
License File: jQuery.license
jQuery.Migrate - Upgrading libraries such as jQuery can be a lot of work, when breaking changes have been introduced. jQuery Migrate makes this easier, by restoring the APIs that were removed, and additionally shows warnings in the browser console (development version of jQuery Migrate only) when removed and/or deprecated APIs are used. (https://github.com/jquery/jquery-migrate/blob/main/LICENSE.txt)
License: OpenJS
License File: jQuery.Migrate.license
jQuery.UI - jQuery UI is an open source library of interface components — interactions, full-featured widgets, and animation effects — based on the stellar jQuery javascript library . Each component is built according to jQuery's event-driven architecture (find something, manipulate it) and is themeable, making it easy for developers of any skill level to integrate and extend into their own code. (https://jquery.org/license/)
License: MIT
License File: jQuery.UI.license

View File

@ -28,6 +28,7 @@ namespace OnlineEditorsExampleMVC
// create a jquery script bundle
bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
"~/Scripts/jquery-{version}.js",
"~/Scripts/jquery-migrate-{version}.js",
"~/Scripts/jquery-ui.js",
"~/Scripts/jquery.blockUI.js",
"~/Scripts/jquery.iframe-transport.js",

View File

@ -682,3 +682,8 @@
max-width:15%;
}
}
@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
.tableRow td:first-child{
max-width: none;
}
}

View File

@ -220,6 +220,7 @@ namespace OnlineEditorsExampleMVC.Helpers
var fileName = GetCorrectName(demoName); // get a file name with an index if the file with such a name already exists
File.Copy(HttpRuntime.AppDomainAppPath + demoPath + demoName, StoragePath(fileName)); // copy file to the storage directory
File.SetLastWriteTime(StoragePath(fileName), DateTime.Now);
return fileName;
}

View File

@ -68,24 +68,24 @@ namespace OnlineEditorsExampleMVC.Helpers
/// <param name="toExtension">Extension to which to convert</param>
/// <param name="documentRevisionId">Key for caching on service</param>
/// <param name="isAsync">Perform conversions asynchronously</param>
/// <param name="convertedDocumentUri">Uri to the converted document</param>
/// <param name="convertedDocumentData">Uri and file type of the converted document</param>
/// <returns>The percentage of conversion completion</returns>
/// <example>
/// string convertedDocumentUri;
/// GetConvertedUri("http://helpcenter.onlyoffice.com/content/GettingStarted.pdf", ".pdf", ".docx", "http://helpcenter.onlyoffice.com/content/GettingStarted.pdf", false, out convertedDocumentUri);
/// Dictionary<string, string> convertedDocumentData;
/// GetConvertedData("http://helpcenter.onlyoffice.com/content/GettingStarted.pdf", ".pdf", ".docx", "http://helpcenter.onlyoffice.com/content/GettingStarted.pdf", false, out convertedDocumentData);
/// </example>
/// <exception>
/// </exception>
public static int GetConvertedUri(string documentUri,
public static int GetConvertedData(string documentUri,
string fromExtension,
string toExtension,
string documentRevisionId,
bool isAsync,
out string convertedDocumentUri,
out Dictionary<string, string> convertedDocumentData,
string filePass = null,
string lang = null)
{
convertedDocumentUri = string.Empty;
convertedDocumentData = new Dictionary<string, string>();
// check if the fromExtension parameter is defined; if not, get it from the document url
fromExtension = string.IsNullOrEmpty(fromExtension) ? Path.GetExtension(documentUri).ToLower() : fromExtension;
@ -119,7 +119,7 @@ namespace OnlineEditorsExampleMVC.Helpers
{ "region", lang }
};
if (JwtManager.Enabled)
if (JwtManager.Enabled && JwtManager.SignatureUseForRequest)
{
// create payload object
var payload = new Dictionary<string, object>
@ -157,7 +157,7 @@ namespace OnlineEditorsExampleMVC.Helpers
}
}
return GetResponseUri(dataResponse, out convertedDocumentUri);
return GetResponseData(dataResponse, out convertedDocumentData);
}
/// <summary>
@ -181,9 +181,9 @@ namespace OnlineEditorsExampleMVC.Helpers
/// Processing document received from the editing service
/// </summary>
/// <param name="jsonDocumentResponse">The resulting json from editing service</param>
/// <param name="responseUri">Uri to the converted document</param>
/// <param name="responseData">Uri and file type of the converted document</param>
/// <returns>The percentage of conversion completion</returns>
private static int GetResponseUri(string jsonDocumentResponse, out string responseUri)
private static int GetResponseData(string jsonDocumentResponse, out Dictionary<string, string> responseData)
{
if (string.IsNullOrEmpty(jsonDocumentResponse)) throw new ArgumentException("Invalid param", "jsonDocumentResponse");
@ -197,14 +197,20 @@ namespace OnlineEditorsExampleMVC.Helpers
var isEndConvert = responseFromService.endConvert;
int resultPercent;
responseUri = string.Empty;
responseData = new Dictionary<string, string>();
var responseUri = string.Empty;
var responseFileType = string.Empty;
if (isEndConvert) // if the conversion is completed
{
responseUri = responseFromService.fileUrl; // get the file url
responseFileType = responseFromService.fileType; // get the file type
responseData.Add("fileUrl", responseUri);
responseData.Add("fileType", responseFileType);
resultPercent = 100;
}
else // if the conversion isn't completed
{
responseData.Add("fileUrl", "");
resultPercent = responseFromService.percent; // get the percentage value
if (resultPercent >= 100) resultPercent = 99;
}

View File

@ -29,11 +29,13 @@ namespace OnlineEditorsExampleMVC.Helpers
{
private static readonly string Secret;
public static readonly bool Enabled;
public static readonly bool SignatureUseForRequest;
static JwtManager()
{
Secret = WebConfigurationManager.AppSettings["files.docservice.secret"] ?? ""; // get token secret from the config parameters
Enabled = !string.IsNullOrEmpty(Secret); // check if the token is enabled
SignatureUseForRequest = bool.Parse(WebConfigurationManager.AppSettings["files.docservice.token.useforrequest"]);
}
// encode a payload object into a token using a secret key

View File

@ -53,7 +53,7 @@ namespace OnlineEditorsExampleMVC.Helpers
var fileData = jss.Deserialize<Dictionary<string, object>>(body);
// check if the document token is enabled
if (JwtManager.Enabled)
if (JwtManager.Enabled && JwtManager.SignatureUseForRequest)
{
string JWTheader = string.IsNullOrEmpty(WebConfigurationManager.AppSettings["files.docservice.header"]) ? "Authorization" : WebConfigurationManager.AppSettings["files.docservice.header"];
@ -108,8 +108,9 @@ namespace OnlineEditorsExampleMVC.Helpers
try
{
// convert file and give url to a new file
string newFileUri;
var result = ServiceConverter.GetConvertedUri(downloadUri, downloadExt, curExt, ServiceConverter.GenerateRevisionId(downloadUri), false, out newFileUri);
Dictionary<string, string> newFileData;
var result = ServiceConverter.GetConvertedData(downloadUri, downloadExt, curExt, ServiceConverter.GenerateRevisionId(downloadUri), false, out newFileData);
var newFileUri = newFileData["fileUrl"];
if (string.IsNullOrEmpty(newFileUri))
{
// get the correct file name if it already exists
@ -195,8 +196,9 @@ namespace OnlineEditorsExampleMVC.Helpers
try
{
// convert file and give url to a new file
string newFileUri;
var result = ServiceConverter.GetConvertedUri(downloadUri, downloadExt, curExt, ServiceConverter.GenerateRevisionId(downloadUri), false, out newFileUri);
Dictionary<string, string> newFileData;
var result = ServiceConverter.GetConvertedData(downloadUri, downloadExt, curExt, ServiceConverter.GenerateRevisionId(downloadUri), false, out newFileData);
var newFileUri = newFileData["fileUrl"];
if (string.IsNullOrEmpty(newFileUri))
{
newFileName = true;
@ -285,7 +287,7 @@ namespace OnlineEditorsExampleMVC.Helpers
}
// check if a secret key to generate token exists or not
if (JwtManager.Enabled)
if (JwtManager.Enabled && JwtManager.SignatureUseForRequest)
{
var payload = new Dictionary<string, object>
{

View File

@ -69,6 +69,7 @@ namespace OnlineEditorsExampleMVC.Helpers
"Cant see anyones information",
"Can't rename files from the editor",
"Can't view chat",
"Can't protect file",
"View file without collaboration",
};
@ -131,7 +132,7 @@ namespace OnlineEditorsExampleMVC.Helpers
new Dictionary<string,object>(),
new List<string>(),
null,
new List<string>(),
new List<string>() { "protect" },
descr_user_0,
false
)

View File

@ -138,6 +138,17 @@ namespace OnlineEditorsExampleMVC.Models
{ "favorite", favorite}
}
},
{
"referenceData", new Dictionary<string, string>()
{
{ "fileKey", !user.id.Equals("uid-0") ?
jss.Serialize(new Dictionary<string, object>{
{"fileName", FileName},
{"userAddress", HttpUtility.UrlEncode(DocManagerHelper.CurUserHostAddress(HttpContext.Current.Request.UserHostAddress))}
}) : null },
{"instanceId", DocManagerHelper.GetServerUrl(false) }
}
},
{
// the permission for the document to be edited and downloaded or not
"permissions", new Dictionary<string, object>
@ -154,7 +165,8 @@ namespace OnlineEditorsExampleMVC.Models
{ "chat", !user.id.Equals("uid-0") },
{ "reviewGroups", user.reviewGroups },
{ "commentGroups", user.commentGroups },
{ "userInfoGroups", user.userInfoGroups }
{ "userInfoGroups", user.userInfoGroups },
{ "protect", !user.deniedPermissions.Contains("protect") }
}
}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -236,6 +236,7 @@ if (typeof jQuery != "undefined") {
window.open(url, "_blank");
jq('#hiddenFileName').val("");
jq.unblockUI();
document.location.reload();
});
jq(document).on("click", "#beginView:not(.disable)", function () {
@ -244,6 +245,7 @@ if (typeof jQuery != "undefined") {
window.open(url, "_blank");
jq('#hiddenFileName').val("");
jq.unblockUI();
document.location.reload();
});
jq(document).on("click", "#beginEmbedded:not(.disable)", function () {

View File

@ -31,7 +31,7 @@
-->
<link rel="icon" href="<%= "content/images/" + Model.DocumentType + ".ico" %>" type="image/x-icon" />
<title><%= Model.FileName + " - ONLYOFFICE" %></title>
<%: Styles.Render("~/Content/editor") %>
</head>
@ -40,7 +40,7 @@
<div id="iframeEditor">
</div>
</div>
<%: Scripts.Render(new []{ WebConfigurationManager.AppSettings["files.docservice.url.site"] + WebConfigurationManager.AppSettings["files.docservice.url.api"] }) %>
<script type="text/javascript" language="javascript">
@ -141,7 +141,7 @@
<% Model.GetMailMergeConfig(out dataMailMergeRecipients); %>
docEditor.setMailMergeRecipients(<%= dataMailMergeRecipients%>); // insert recipient data for mail merge into the file
};
var onRequestSaveAs = function (event) { // the user is trying to save file by clicking Save Copy as... button
var title = event.data.title;
var url = event.data.url;
@ -178,6 +178,18 @@
}
};
var onRequestReferenceData = function (event) { // user refresh external data source
event.data.directUrl = !!config.document.directUrl;
let xhr = new XMLHttpRequest();
xhr.open("POST", "webeditor.ashx?type=reference");
xhr.setRequestHeader("Content-Type", "application/json");
xhr.send(JSON.stringify(event.data));
xhr.onload = function () {
console.log(xhr.responseText);
docEditor.setReferenceData(JSON.parse(xhr.responseText));
}
};
config = <%= Model.GetDocConfig(Request, Url) %>;
config.width = "100%";
@ -186,7 +198,6 @@
config.events = {
'onAppReady': onAppReady,
'onDocumentStateChange': onDocumentStateChange,
'onRequestEditRights': onRequestEditRights,
'onError': onError,
'onOutdatedVersion': onOutdatedVersion,
"onMakeActionLink": onMakeActionLink,
@ -216,7 +227,7 @@
docEditor.setHistoryData(histData[ver - 1]); // send the link to the document for viewing the version history
};
// the user is trying to go back to the document from viewing the document version history
config.events['onRequestHistoryClose '] = function () {
config.events['onRequestHistoryClose'] = function () {
document.location.reload();
};
<% } %>
@ -239,6 +250,9 @@
};
// prevent file renaming for anonymous users
config.events['onRequestRename'] = onRequestRename;
config.events['onRequestReferenceData'] = onRequestReferenceData;
// prevent switch the document from the viewing into the editing mode for anonymous users
config.events['onRequestEditRights'] = onRequestEditRights;
}
if (config.editorConfig.createUrl) {

View File

@ -74,6 +74,9 @@ namespace OnlineEditorsExampleMVC
case "rename":
Rename(context);
break;
case "reference":
Reference(context);
break;
}
}
@ -227,11 +230,10 @@ namespace OnlineEditorsExampleMVC
var fileUri = DocManagerHelper.GetDownloadUrl(fileName);
var extension = (Path.GetExtension(fileName).ToLower() ?? "").Trim('.');
var internalExtension = DocManagerHelper.GetInternalExtension(FileUtility.GetFileType(fileName)).Trim('.');
var internalExtension = "ooxml";
// check if the file with such an extension can be converted
if (DocManagerHelper.ConvertExts.Contains("." + extension)
&& !string.IsNullOrEmpty(internalExtension))
if (DocManagerHelper.ConvertExts.Contains("." + extension))
{
// generate document key
var key = ServiceConverter.GenerateRevisionId(fileUri);
@ -244,17 +246,19 @@ namespace OnlineEditorsExampleMVC
Query = "type=download&fileName=" + HttpUtility.UrlEncode(fileName)
};
// get the url to the converted file
string newFileUri;
var result = ServiceConverter.GetConvertedUri(downloadUri.ToString(), extension, internalExtension, key, true, out newFileUri, filePass, lang);
// get the url and file type of the converted file
Dictionary<string, string> newFileData;
var result = ServiceConverter.GetConvertedData(downloadUri.ToString(), extension, internalExtension, key, true, out newFileData, filePass, lang);
if (result != 100)
{
context.Response.Write("{ \"step\" : \"" + result + "\", \"filename\" : \"" + fileName + "\"}");
return;
}
var newFileUri = newFileData["fileUrl"];
var newFileType = "." + newFileData["fileType"];
// get a file name of an internal file extension with an index if the file with such a name already exists
var correctName = DocManagerHelper.GetCorrectName(Path.GetFileNameWithoutExtension(fileName) + "." + internalExtension);
var correctName = DocManagerHelper.GetCorrectName(Path.GetFileNameWithoutExtension(fileName) + newFileType);
var req = (HttpWebRequest)WebRequest.Create(newFileUri);
@ -461,7 +465,7 @@ namespace OnlineEditorsExampleMVC
var userAddress = context.Request["userAddress"];
var isEmbedded = context.Request["dmode"];
if (JwtManager.Enabled && isEmbedded == null && userAddress != null)
if (JwtManager.Enabled && isEmbedded == null && userAddress != null && JwtManager.SignatureUseForRequest)
{
string JWTheader = string.IsNullOrEmpty(WebConfigurationManager.AppSettings["files.docservice.header"]) ? "Authorization" : WebConfigurationManager.AppSettings["files.docservice.header"];
@ -519,7 +523,7 @@ namespace OnlineEditorsExampleMVC
var version = System.Convert.ToInt32(context.Request["ver"]);
var file = Path.GetFileName(context.Request["file"]);
if (JwtManager.Enabled)
if (JwtManager.Enabled && JwtManager.SignatureUseForRequest)
{
string JWTheader = string.IsNullOrEmpty(WebConfigurationManager.AppSettings["files.docservice.header"]) ? "Authorization" : WebConfigurationManager.AppSettings["files.docservice.header"];
@ -591,5 +595,98 @@ namespace OnlineEditorsExampleMVC
TrackManager.commandRequest("meta", docKey, meta);
context.Response.Write("{ \"result\": \"OK\"}");
}
private static void Reference(HttpContext context)
{
string fileData;
try
{
using (var receiveStream = context.Request.InputStream)
using (var readStream = new StreamReader(receiveStream))
{
fileData = readStream.ReadToEnd();
if (string.IsNullOrEmpty(fileData)) return;
}
}
catch (Exception e)
{
throw new HttpException((int)HttpStatusCode.BadRequest, e.Message);
}
var jss = new JavaScriptSerializer();
var body = jss.Deserialize<Dictionary<string, object>>(fileData);
Dictionary<string, object> referenceData = null;
var fileName = "";
var userAddress = "";
if (body.ContainsKey("referenceData"))
{
referenceData = jss.Deserialize<Dictionary<string, object>>(jss.Serialize(body["referenceData"]));
var instanceId = (string)referenceData["instanceId"];
var fileKey = (string)referenceData["fileKey"];
if (instanceId == DocManagerHelper.GetServerUrl(false))
{
var fileKeyObj = jss.Deserialize<Dictionary<string, object>>(fileKey);
userAddress = (string)fileKeyObj["userAddress"];
if (userAddress == HttpUtility.UrlEncode(DocManagerHelper.CurUserHostAddress(HttpContext.Current.Request.UserHostAddress)))
{
fileName = (string)fileKeyObj["fileName"];
}
}
}
if (fileName == "")
{
try
{
var path = (string)body["path"];
path = Path.GetFileName(path);
if (File.Exists(DocManagerHelper.StoragePath(path, null)))
{
fileName = path;
}
}
catch
{
context.Response.Write("{ \"error\": \"Path not found!\"}");
return;
}
}
if (fileName == "")
{
context.Response.Write("{ \"error\": \"File not found!\"}");
return;
}
var directUrl = (bool)body["directUrl"];
var data = new Dictionary<string, object>() {
{ "fileType", (Path.GetExtension(fileName) ?? "").ToLower().Trim('.') },
{ "url", DocManagerHelper.GetDownloadUrl(fileName)},
{ "directUrl", directUrl ? DocManagerHelper.GetDownloadUrl(fileName, false) : null },
{ "referenceData", new Dictionary<string, string>()
{
{ "fileKey", jss.Serialize(new Dictionary<string, object>{
{"fileName", fileName},
{"userAddress", HttpUtility.UrlEncode(DocManagerHelper.CurUserHostAddress(HttpContext.Current.Request.UserHostAddress))}
})
},
{ "instanceId", DocManagerHelper.GetServerUrl(false) }
}
},
{ "path", fileName }
};
if (JwtManager.Enabled)
{
var token = JwtManager.Encode(data);
data.Add("token", token);
}
context.Response.Write(jss.Serialize(data));
}
}
}

View File

@ -4,10 +4,6 @@ Entity Framework - Entity Framework is an object-relational mapper that enables
License: MICROSOFT SOFTWARE SUPPLEMENTAL TERMS, MICROSOFT SOFTWARE LICENSE TERMS
License File: EntityFramework.license
jQuery - jQuery is a new kind of JavaScript Library. jQuery is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development. jQuery is designed to change the way that you write JavaScript. NOTE: This package is maintained on behalf of the library owners by the NuGet Community Packages project at https://nugetpackages.codeplex.com/ (https://jquery.org/license/)
License: MIT
License File: jQuery.license
jQuery.BlockUI - The jQuery BlockUI Plugin lets you simulate synchronous behavior when using AJAX, without locking the browser. (https://github.com/malsup/blockui/)
License: MIT, GPL
License File: jQuery.BlockUI.license
@ -20,6 +16,14 @@ jQuery.iframe-transport - jQuery Iframe Transport Plugin for File Upload (https:
License: MIT
License File: jQuery.iframe-transport.license
jQuery - jQuery is a new kind of JavaScript Library. jQuery is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development. jQuery is designed to change the way that you write JavaScript. NOTE: This package is maintained on behalf of the library owners by the NuGet Community Packages project at https://nugetpackages.codeplex.com/ (https://jquery.org/license/)
License: MIT
License File: jQuery.license
jQuery.Migrate - Upgrading libraries such as jQuery can be a lot of work, when breaking changes have been introduced. jQuery Migrate makes this easier, by restoring the APIs that were removed, and additionally shows warnings in the browser console (development version of jQuery Migrate only) when removed and/or deprecated APIs are used. (https://github.com/jquery/jquery-migrate/blob/main/LICENSE.txt)
License: OpenJS
License File: jQuery.Migrate.license
jQuery.UI - jQuery UI is an open source library of interface components — interactions, full-featured widgets, and animation effects — based on the stellar jQuery javascript library . Each component is built according to jQuery's event-driven architecture (find something, manipulate it) and is themeable, making it easy for developers of any skill level to integrate and extend into their own code. (https://jquery.org/license/)
License: MIT
License File: jQuery.UI.license

View File

@ -0,0 +1,36 @@
Copyright OpenJS Foundation and other contributors, https://openjsf.org/
This software consists of voluntary contributions made by many
individuals. For exact contribution history, see the revision history
available at https://github.com/jquery/jquery-migrate
The following license applies to all parts of this software except as
documented below:
====
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
====
All files located in the node_modules and external directories are
externally maintained libraries used by this software which have their
own licenses; we recommend you read them, as their terms may differ from
the terms above.

View File

@ -1,4 +1,4 @@
Copyright (c) 2009 John Resig, http://jquery.com/
Copyright OpenJS Foundation and other contributors, https://openjsf.org/
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the

View File

@ -1,22 +1,24 @@
<?xml version="1.0"?>
<appSettings>
<clear />
<add key="version" value="1.5.0"/>
<add key="version" value="1.6.0"/>
<add key="filesize-max" value="52428800"/>
<add key="storage-path" value=""/>
<add key="files.docservice.fillform-docs" value=".oform|.docx"/>
<add key="files.docservice.viewed-docs" value=".pdf|.djvu|.xps|.oxps"/>
<add key="files.docservice.edited-docs" value=".docx|.xlsx|.csv|.pptx|.txt|.docxf"/>
<add key="files.docservice.convert-docs" value=".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"/>
<add key="files.docservice.fillform-docs" value=".docx|.oform"/>
<add key="files.docservice.viewed-docs" value=".djvu|.oxps|.pdf|.xps"/>
<add key="files.docservice.edited-docs" value=".csv|.docm|.docx|.docxf|.dotm|.dotx|.epub|.fb2|.html|.odp|.ods|.odt|.otp|.ots|.ott|.potm|.potx|.ppsm|.ppsx|.pptm|.pptx|.rtf|.txt|.xlsm|.xlsx|.xltm|.xltx"/>
<add key="files.docservice.convert-docs" value=".doc|.dot|.dps|.dpt|.epub|.et|.ett|.fb2|.fodp|.fods|.fodt|.htm|.html|.mht|.mhtml|.odp|.ods|.odt|.otp|.ots|.ott|.pot|.pps|.ppt|.rtf|.stw|.sxc|.sxi|.sxw|.wps|.wpt|.xls|.xlsb|.xlt|.xml"/>
<add key="files.docservice.timeout" value="120000" />
<add key="files.docservice.secret" value="" />
<add key="files.docservice.header" value="Authorization" />
<add key="files.docservice.token.useforrequest" value="true" />
<add key="files.docservice.verify-peer-off" value="true"/>
<add key="files.docservice.languages" value="en:English|hy:Armenian|az:Azerbaijani|eu:Basque|be:Belarusian|bg:Bulgarian|ca:Catalan|zh:Chinese (People's Republic of China)|zh-TW:Chinese (Traditional, Taiwan)|cs:Czech|da:Danish|nl:Dutch|fi:Finnish|fr:French|gl:Galego|de:German|el:Greek|hu:Hungarian|id:Indonesian|it:Italian|ja:Japanese|ko:Korean|lv:Latvian|lo:Lao|ms:Malay (Malaysia)|nb:Norwegian|pl:Polish|pt:Portuguese (Brazil)|pt-PT:Portuguese (Portugal)|ro:Romanian|ru:Russian|sk:Slovak|sl:Slovenian|es:Spanish|sv:Swedish|tr:Turkish|uk:Ukrainian|vi:Vietnamese|aa-AA: Test Language"/>
<add key="files.docservice.languages" value="en:English|hy:Armenian|az:Azerbaijani|eu:Basque|be:Belarusian|bg:Bulgarian|ca:Catalan|zh:Chinese (Simplified)|zh-TW:Chinese (Traditional)|cs:Czech|da:Danish|nl:Dutch|fi:Finnish|fr:French|gl:Galego|de:German|el:Greek|hu:Hungarian|id:Indonesian|it:Italian|ja:Japanese|ko:Korean|lo:Lao|lv:Latvian|ms:Malay (Malaysia)|no:Norwegian|pl:Polish|pt:Portuguese (Brazil)|pt-PT:Portuguese (Portugal)|ro:Romanian|ru:Russian|si:Sinhala (Sri Lanka)|sk:Slovak|sl:Slovenian|es:Spanish|sv:Swedish|tr:Turkish|uk:Ukrainian|vi:Vietnamese|aa-AA: Test Language"/>
<add key="files.docservice.url.site" value="http://documentserver/"/>

View File

@ -1,9 +1,5 @@
ONLYOFFICE Applications example uses code from the following 3rd party projects:
jQuery - jQuery is a new kind of JavaScript Library. jQuery is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development. jQuery is designed to change the way that you write JavaScript. NOTE: This package is maintained on behalf of the library owners by the NuGet Community Packages project at https://nugetpackages.codeplex.com/ (https://jquery.org/license/)
License: MIT
License File: jQuery.license
jQuery.BlockUI - The jQuery BlockUI Plugin lets you simulate synchronous behavior when using AJAX, without locking the browser. (https://github.com/malsup/blockui/)
License: MIT, GPL
License File: jQuery.BlockUI.license
@ -16,6 +12,14 @@ jQuery.iframe-transport - jQuery Iframe Transport Plugin for File Upload (https:
License: MIT
License File: jQuery.iframe-transport.license
jQuery - jQuery is a new kind of JavaScript Library. jQuery is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development. jQuery is designed to change the way that you write JavaScript. NOTE: This package is maintained on behalf of the library owners by the NuGet Community Packages project at https://nugetpackages.codeplex.com/ (https://jquery.org/license/)
License: MIT
License File: jQuery.license
jQuery.Migrate - Upgrading libraries such as jQuery can be a lot of work, when breaking changes have been introduced. jQuery Migrate makes this easier, by restoring the APIs that were removed, and additionally shows warnings in the browser console (development version of jQuery Migrate only) when removed and/or deprecated APIs are used. (https://github.com/jquery/jquery-migrate/blob/main/LICENSE.txt)
License: OpenJS
License File: jQuery.Migrate.license
jQuery.UI - jQuery UI is an open source library of interface components — interactions, full-featured widgets, and animation effects — based on the stellar jQuery javascript library . Each component is built according to jQuery's event-driven architecture (find something, manipulate it) and is themeable, making it easy for developers of any skill level to integrate and extend into their own code. (https://jquery.org/license/)
License: MIT
License File: jQuery.UI.license

View File

@ -682,3 +682,8 @@
max-width:15%;
}
}
@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
.tableRow td:first-child{
max-width: none;
}
}

View File

@ -356,7 +356,8 @@
</footer>
</form>
<script language="javascript" type="text/javascript" src="script/jquery-1.9.0.min.js"></script>
<script language="javascript" type="text/javascript" src="script/jquery-3.6.4.min.js"></script>
<script language="javascript" type="text/javascript" src="script/jquery-migrate-3.4.1.min.js"></script>
<script language="javascript" type="text/javascript" src="script/jquery-ui.min.js"></script>
<script language="javascript" type="text/javascript" src="script/jquery.blockUI.js"></script>
<script language="javascript" type="text/javascript" src="script/jquery.iframe-transport.js"></script>

View File

@ -471,11 +471,10 @@ namespace OnlineEditorsExample
var lang = context.Request.Cookies.GetOrDefault("ulang", null);
var extension = (Path.GetExtension(_fileName).ToLower() ?? "").Trim('.');
var internalExtension = FileType.GetInternalExtension(_fileName).Trim('.');
var internalExtension = "ooxml";
// check if the file with such an extension can be converted
if (ConvertExts.Contains("." + extension)
&& !string.IsNullOrEmpty(internalExtension))
if (ConvertExts.Contains("." + extension))
{
// generate document key
var key = ServiceConverter.GenerateRevisionId(FileUri(_fileName, true));
@ -487,16 +486,18 @@ namespace OnlineEditorsExample
fileUrl.Query = "type=download&fileName=" + HttpUtility.UrlEncode(_fileName)
+ "&userAddress=" + HttpUtility.UrlEncode(CurUserHostAddress(HttpContext.Current.Request.UserHostAddress));
// get the url to the converted file
string newFileUri;
var result = ServiceConverter.GetConvertedUri(fileUrl.ToString() , extension, internalExtension, key, true, out newFileUri, filePass, lang);
// get the url and file type of the converted file
Dictionary<string, string> newFileData;
var result = ServiceConverter.GetConvertedData(fileUrl.ToString() , extension, internalExtension, key, true, out newFileData, filePass, lang);
if (result != 100)
{
return "{ \"step\" : \"" + result + "\", \"filename\" : \"" + _fileName + "\"}";
}
var newFileUri = newFileData["fileUrl"];
var newFileType = "." + newFileData["fileType"];
// get a file name of an internal file extension with an index if the file with such a name already exists
var fileName = GetCorrectName(Path.GetFileNameWithoutExtension(_fileName) + "." + internalExtension);
var fileName = GetCorrectName(Path.GetFileNameWithoutExtension(_fileName) + newFileType);
var req = (HttpWebRequest)WebRequest.Create(newFileUri);

View File

@ -153,7 +153,7 @@
var onRequestMailMergeRecipients = function (event) {
docEditor.setMailMergeRecipients(<%= DataMailMergeRecipients %>); // insert recipient data for mail merge into the file
};
var onRequestSaveAs = function (event) { // the user is trying to save file by clicking Save Copy as... button
var title = event.data.title;
var url = event.data.url;
@ -190,6 +190,19 @@
}
};
var onRequestReferenceData = function (event) { // user refresh external data source
event.data.directUrl = !!config.document.directUrl;
let xhr = new XMLHttpRequest();
xhr.open("POST", "webeditor.ashx?type=reference");
xhr.setRequestHeader("Content-Type", "application/json");
xhr.send(JSON.stringify(event.data));
xhr.onload = function () {
console.log(xhr.responseText);
docEditor.setReferenceData(JSON.parse(xhr.responseText));
}
};
config = <%= DocConfig %>;
config.width = "100%";
@ -198,7 +211,6 @@
config.events = {
'onAppReady': onAppReady,
'onDocumentStateChange': onDocumentStateChange,
'onRequestEditRights': onRequestEditRights,
'onError': onError,
'onOutdatedVersion': onOutdatedVersion,
'onMakeActionLink': onMakeActionLink,
@ -219,7 +231,7 @@
var histData = <%= HistoryData %>;
docEditor.setHistoryData(histData[ver - 1]); // send the link to the document for viewing the version history
};
config.events['onRequestHistoryClose '] = function () { // the user is trying to go back to the document from viewing the document version history
config.events['onRequestHistoryClose'] = function () { // the user is trying to go back to the document from viewing the document version history
document.location.reload();
};
<% } %>
@ -242,6 +254,9 @@
};
// prevent file renaming for anonymous users
config.events['onRequestRename'] = onRequestRename;
config.events['onRequestReferenceData'] = onRequestReferenceData;
// prevent switch the document from the viewing into the editing mode for anonymous users
config.events['onRequestEditRights'] = onRequestEditRights;
}
if (config.editorConfig.createUrl) {

View File

@ -206,6 +206,17 @@ namespace OnlineEditorsExample
{ "favorite", favorite }
}
},
{
"referenceData", new Dictionary<string, string>()
{
{ "fileKey", !user.id.Equals("uid-0") ?
jss.Serialize(new Dictionary<string, object>{
{"fileName", FileName},
{"userAddress", HttpUtility.UrlEncode(_Default.CurUserHostAddress(HttpContext.Current.Request.UserHostAddress))}
}) : null },
{"instanceId", _Default.GetServerUrl(false) }
}
},
{
// the permission for the document to be edited and downloaded or not
"permissions", new Dictionary<string, object>
@ -222,7 +233,8 @@ namespace OnlineEditorsExample
{ "chat", !user.id.Equals("uid-0") },
{ "reviewGroups", user.reviewGroups },
{ "commentGroups", user.commentGroups },
{ "userInfoGroups", user.userInfoGroups }
{ "userInfoGroups", user.userInfoGroups },
{ "protect", !user.deniedPermissions.Contains("protect") }
}
}
}
@ -620,6 +632,7 @@ namespace OnlineEditorsExample
var filePath = _Default.StoragePath(FileName, null);
File.Copy(HttpRuntime.AppDomainAppPath + demoPath + demoName, filePath); // copy this file to the storage directory
File.SetLastWriteTime(filePath, DateTime.Now);
// create a json file with file meta data
var id = request.Cookies.GetOrDefault("uid", null);

View File

@ -70,24 +70,24 @@ namespace ASC.Api.DocumentConverter
/// <param name="toExtension">Extension to which to convert</param>
/// <param name="documentRevisionId">Key for caching on service</param>
/// <param name="isAsync">Perform conversions asynchronously</param>
/// <param name="convertedDocumentUri">Uri to the converted document</param>
/// <param name="convertedDocumentData">Uri and file type of the converted document</param>
/// <returns>The percentage of conversion completion</returns>
/// <example>
/// string convertedDocumentUri;
/// GetConvertedUri("http://helpcenter.onlyoffice.com/content/GettingStarted.pdf", ".pdf", ".docx", "http://helpcenter.onlyoffice.com/content/GettingStarted.pdf", false, out convertedDocumentUri);
/// Dictionary<string, string> convertedDocumentData;
/// GetConvertedData("http://helpcenter.onlyoffice.com/content/GettingStarted.pdf", ".pdf", ".docx", "http://helpcenter.onlyoffice.com/content/GettingStarted.pdf", false, out convertedDocumentData);
/// </example>
/// <exception>
/// </exception>
public static int GetConvertedUri(string documentUri,
public static int GetConvertedData(string documentUri,
string fromExtension,
string toExtension,
string documentRevisionId,
bool isAsync,
out string convertedDocumentUri,
out Dictionary<string, string> convertedDocumentData,
string filePass = null,
string lang = null)
{
convertedDocumentUri = string.Empty;
convertedDocumentData = new Dictionary<string, string>();
// check if the fromExtension parameter is defined; if not, get it from the document url
fromExtension = string.IsNullOrEmpty(fromExtension) ? Path.GetExtension(documentUri).ToLower() : fromExtension;
@ -121,7 +121,7 @@ namespace ASC.Api.DocumentConverter
{ "region", lang }
};
if (JwtManager.Enabled)
if (JwtManager.Enabled && JwtManager.SignatureUseForRequest)
{
// create payload object
var payload = new Dictionary<string, object>
@ -159,7 +159,7 @@ namespace ASC.Api.DocumentConverter
}
}
return GetResponseUri(dataResponse, out convertedDocumentUri);
return GetResponseData(dataResponse, out convertedDocumentData);
}
/// <summary>
@ -183,9 +183,9 @@ namespace ASC.Api.DocumentConverter
/// Processing document received from the editing service
/// </summary>
/// <param name="jsonDocumentResponse">The resulting json from editing service</param>
/// <param name="responseUri">Uri to the converted document</param>
/// <param name="responseData">Uri and file type of the converted document</param>
/// <returns>The percentage of conversion completion</returns>
private static int GetResponseUri(string jsonDocumentResponse, out string responseUri)
private static int GetResponseData(string jsonDocumentResponse, out Dictionary<string, string> responseData)
{
if (string.IsNullOrEmpty(jsonDocumentResponse)) throw new ArgumentException("Invalid param", "jsonDocumentResponse");
@ -199,14 +199,20 @@ namespace ASC.Api.DocumentConverter
var isEndConvert = responseFromService.endConvert;
int resultPercent;
responseUri = string.Empty;
responseData = new Dictionary<string, string>();
var responseUri = string.Empty;
var responseFileType = string.Empty;
if (isEndConvert) // if the conversion is completed
{
responseUri = responseFromService.fileUrl; // get the file url
responseFileType = responseFromService.fileType; // get the file type
responseData.Add("fileUrl", responseUri);
responseData.Add("fileType", responseFileType);
resultPercent = 100;
}
else // if the conversion isn't completed
{
responseData.Add("fileUrl", "");
resultPercent = responseFromService.percent; // get the percentage value
if (resultPercent >= 100) resultPercent = 99;
}

View File

@ -29,11 +29,13 @@ namespace OnlineEditorsExample
{
private static readonly string Secret;
public static readonly bool Enabled;
public static readonly bool SignatureUseForRequest;
static JwtManager()
{
Secret = WebConfigurationManager.AppSettings["files.docservice.secret"] ?? ""; // get token secret from the config parameters
Enabled = !string.IsNullOrEmpty(Secret); // check if the token is enabled
SignatureUseForRequest = bool.Parse(WebConfigurationManager.AppSettings["files.docservice.token.useforrequest"]);
}
// encode a payload object into a token using a secret key

View File

@ -55,7 +55,7 @@ namespace OnlineEditorsExample
var fileData = jss.Deserialize<Dictionary<string, object>>(body);
// check if the document token is enabled
if (JwtManager.Enabled)
if (JwtManager.Enabled && JwtManager.SignatureUseForRequest)
{
string JWTheader = string.IsNullOrEmpty(WebConfigurationManager.AppSettings["files.docservice.header"]) ? "Authorization" : WebConfigurationManager.AppSettings["files.docservice.header"];
@ -110,8 +110,9 @@ namespace OnlineEditorsExample
try
{
// convert file and give url to a new file
string newFileUri;
ServiceConverter.GetConvertedUri(downloadUri, downloadExt, curExt, ServiceConverter.GenerateRevisionId(downloadUri), false, out newFileUri);
Dictionary<string, string> newFileData;
ServiceConverter.GetConvertedData(downloadUri, downloadExt, curExt, ServiceConverter.GenerateRevisionId(downloadUri), false, out newFileData);
var newFileUri = newFileData["fileUrl"];
if (string.IsNullOrEmpty(newFileUri))
{
// get the correct file name if it already exists
@ -197,8 +198,9 @@ namespace OnlineEditorsExample
try
{
// convert file and give url to a new file
string newFileUri;
var result = ServiceConverter.GetConvertedUri(downloadUri, downloadExt, curExt, ServiceConverter.GenerateRevisionId(downloadUri), false, out newFileUri);
Dictionary<string, string> newFileData;
var result = ServiceConverter.GetConvertedData(downloadUri, downloadExt, curExt, ServiceConverter.GenerateRevisionId(downloadUri), false, out newFileData);
var newFileUri = newFileData["fileUrl"];
if (string.IsNullOrEmpty(newFileUri))
{
newFileName = true;
@ -288,7 +290,7 @@ namespace OnlineEditorsExample
}
// check if a secret key to generate token exists or not
if (JwtManager.Enabled)
if (JwtManager.Enabled && JwtManager.SignatureUseForRequest)
{
var payload = new Dictionary<string, object>
{

View File

@ -68,6 +68,7 @@ namespace OnlineEditorsExample
"Cant see anyones information",
"Can't rename files from the editor",
"Can't view chat",
"Can't protect file",
"View file without collaboration",
};
@ -130,7 +131,7 @@ namespace OnlineEditorsExample
new Dictionary<string, object>(),
new List<string>(),
null,
new List<string>(),
new List<string>() { "protect" },
descr_user_0,
false
)

View File

@ -26,6 +26,7 @@ using System.Diagnostics;
using System.Web.Configuration;
using System.Linq;
using System.Net;
using System.Net.Sockets;
namespace OnlineEditorsExample
{
@ -71,6 +72,9 @@ namespace OnlineEditorsExample
case "rename":
Rename(context);
break;
case "reference":
Reference(context);
break;
}
}
@ -281,7 +285,7 @@ namespace OnlineEditorsExample
var userAddress = Path.GetFileName(context.Request["userAddress"]);
var isEmbedded = context.Request["dmode"];
if (JwtManager.Enabled && isEmbedded == null && userAddress != null)
if (JwtManager.Enabled && isEmbedded == null && userAddress != null && JwtManager.SignatureUseForRequest)
{
string JWTheader = string.IsNullOrEmpty(WebConfigurationManager.AppSettings["files.docservice.header"]) ? "Authorization" : WebConfigurationManager.AppSettings["files.docservice.header"];
@ -338,7 +342,7 @@ namespace OnlineEditorsExample
var version = Path.GetFileName(context.Request["ver"]);
var file = Path.GetFileName(context.Request["file"]);
if (JwtManager.Enabled)
if (JwtManager.Enabled && JwtManager.SignatureUseForRequest)
{
string JWTheader = string.IsNullOrEmpty(WebConfigurationManager.AppSettings["files.docservice.header"]) ? "Authorization" : WebConfigurationManager.AppSettings["files.docservice.header"];
@ -409,5 +413,96 @@ namespace OnlineEditorsExample
TrackManager.commandRequest("meta", docKey, meta);
context.Response.Write("{ \"result\": \"OK\"}");
}
private static void Reference(HttpContext context)
{
string fileData;
try
{
using (var receiveStream = context.Request.InputStream)
using (var readStream = new StreamReader(receiveStream))
{
fileData = readStream.ReadToEnd();
if (string.IsNullOrEmpty(fileData)) return;
}
}
catch (Exception e)
{
throw new HttpException((int)HttpStatusCode.BadRequest, e.Message);
}
var jss = new JavaScriptSerializer();
var body = jss.Deserialize<Dictionary<string, object>>(fileData);
Dictionary<string, object> referenceData = null;
var fileName = "";
var userAddress = "";
if (body.ContainsKey("referenceData"))
{
referenceData = jss.Deserialize<Dictionary<string, object>>(jss.Serialize(body["referenceData"]));
var instanceId = (string)referenceData["instanceId"];
var fileKey = (string)referenceData["fileKey"];
if (instanceId == _Default.GetServerUrl(false))
{
var fileKeyObj = jss.Deserialize<Dictionary<string, object>>(fileKey);
userAddress = (string)fileKeyObj["userAddress"];
if (userAddress == HttpUtility.UrlEncode(_Default.CurUserHostAddress(HttpContext.Current.Request.UserHostAddress)))
{
fileName = (string)fileKeyObj["fileName"];
}
}
}
if (fileName == "")
{
try
{
var path = (string)body["path"];
path = Path.GetFileName(path);
if (File.Exists(_Default.StoragePath(path, null)))
{
fileName = path;
}
}
catch
{
context.Response.Write("{ \"error\": \"Path not found!\"}");
return;
}
}
if (fileName == "")
{
context.Response.Write("{ \"error\": \"File not found!\"}");
return;
}
var directUrl = (bool) body["directUrl"];
var data = new Dictionary<string, object>() {
{ "fileType", (Path.GetExtension(fileName) ?? "").ToLower().Trim('.') },
{ "url", DocEditor.getDownloadUrl(fileName)},
{ "directUrl", directUrl ? DocEditor.getDownloadUrl(fileName, false) : null},
{ "referenceData", new Dictionary<string, string>()
{
{ "fileKey", jss.Serialize(new Dictionary<string, object>{
{"fileName", fileName},
{"userAddress", HttpUtility.UrlEncode(_Default.CurUserHostAddress(HttpContext.Current.Request.UserHostAddress))}
})
},
{"instanceId", _Default.GetServerUrl(false) }
}
},
{ "path", fileName }
};
if (JwtManager.Enabled)
{
var token = JwtManager.Encode(data);
data.Add("token", token);
}
context.Response.Write(jss.Serialize(data));
}
}
}

View File

@ -1,9 +1,5 @@
ONLYOFFICE Applications example uses code from the following 3rd party projects:
jQuery - jQuery is a new kind of JavaScript Library. jQuery is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development. jQuery is designed to change the way that you write JavaScript. NOTE: This package is maintained on behalf of the library owners by the NuGet Community Packages project at https://nugetpackages.codeplex.com/ (https://jquery.org/license/)
License: MIT
License File: jQuery.license
jQuery.BlockUI - The jQuery BlockUI Plugin lets you simulate synchronous behavior when using AJAX, without locking the browser. (https://github.com/malsup/blockui/)
License: MIT, GPL
License File: jQuery.BlockUI.license
@ -16,6 +12,14 @@ jQuery.iframe-transport - jQuery Iframe Transport Plugin for File Upload (https:
License: MIT
License File: jQuery.iframe-transport.license
jQuery - jQuery is a new kind of JavaScript Library. jQuery is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development. jQuery is designed to change the way that you write JavaScript. NOTE: This package is maintained on behalf of the library owners by the NuGet Community Packages project at https://nugetpackages.codeplex.com/ (https://jquery.org/license/)
License: MIT
License File: jQuery.license
jQuery.Migrate - Upgrading libraries such as jQuery can be a lot of work, when breaking changes have been introduced. jQuery Migrate makes this easier, by restoring the APIs that were removed, and additionally shows warnings in the browser console (development version of jQuery Migrate only) when removed and/or deprecated APIs are used. (https://github.com/jquery/jquery-migrate/blob/main/LICENSE.txt)
License: OpenJS
License File: jQuery.Migrate.license
jQuery.UI - jQuery UI is an open source library of interface components — interactions, full-featured widgets, and animation effects — based on the stellar jQuery javascript library . Each component is built according to jQuery's event-driven architecture (find something, manipulate it) and is themeable, making it easy for developers of any skill level to integrate and extend into their own code. (https://jquery.org/license/)
License: MIT
License File: jQuery.UI.license

View File

@ -0,0 +1,36 @@
Copyright OpenJS Foundation and other contributors, https://openjsf.org/
This software consists of voluntary contributions made by many
individuals. For exact contribution history, see the revision history
available at https://github.com/jquery/jquery-migrate
The following license applies to all parts of this software except as
documented below:
====
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
====
All files located in the node_modules and external directories are
externally maintained libraries used by this software which have their
own licenses; we recommend you read them, as their terms may differ from
the terms above.

View File

@ -1,4 +1,4 @@
Copyright (c) 2009 John Resig, http://jquery.com/
Copyright OpenJS Foundation and other contributors, https://openjsf.org/
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -236,6 +236,7 @@ if (typeof jQuery != "undefined") {
window.open(url, "_blank");
jq('#hiddenFileName').val("");
jq.unblockUI();
document.location.reload();
});
jq(document).on("click", "#beginView:not(.disable)", function () {
@ -244,6 +245,7 @@ if (typeof jQuery != "undefined") {
window.open(url, "_blank");
jq('#hiddenFileName').val("");
jq.unblockUI();
document.location.reload();
});
jq(document).on("click", "#beginEmbedded:not(.disable)", function () {

View File

@ -1,21 +1,23 @@
<?xml version="1.0" encoding="utf-8" ?>
<appSettings>
<clear />
<add key="version" value="1.5.0"/>
<add key="version" value="1.6.0"/>
<add key="filesize-max" value="52428800"/>
<add key="storage-path" value=""/>
<add key="files.docservice.fillform-docs" value=".oform|.docx"/>
<add key="files.docservice.viewed-docs" value=".pdf|.djvu|.xps|.oxps"/>
<add key="files.docservice.edited-docs" value=".docx|.xlsx|.csv|.pptx|.txt|.docxf"/>
<add key="files.docservice.convert-docs" value=".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"/>
<add key="files.docservice.fillform-docs" value=".docx|.oform"/>
<add key="files.docservice.viewed-docs" value=".djvu|.oxps|.pdf|.xps"/>
<add key="files.docservice.edited-docs" value=".csv|.docm|.docx|.docxf|.dotm|.dotx|.epub|.fb2|.html|.odp|.ods|.odt|.otp|.ots|.ott|.potm|.potx|.ppsm|.ppsx|.pptm|.pptx|.rtf|.txt|.xlsm|.xlsx|.xltm|.xltx"/>
<add key="files.docservice.convert-docs" value=".doc|.dot|.dps|.dpt|.epub|.et|.ett|.fb2|.fodp|.fods|.fodt|.htm|.html|.mht|.mhtml|.odp|.ods|.odt|.otp|.ots|.ott|.pot|.pps|.ppt|.rtf|.stw|.sxc|.sxi|.sxw|.wps|.wpt|.xls|.xlsb|.xlt|.xml"/>
<add key="files.docservice.timeout" value="120000" />
<add key="files.docservice.secret" value="" />
<add key="files.docservice.header" value="Authorization" />
<add key="files.docservice.verify-peer-off" value="true"/>
<add key="files.docservice.languages" value="en:English|hy:Armenian|az:Azerbaijani|eu:Basque|be:Belarusian|bg:Bulgarian|ca:Catalan|zh:Chinese (People's Republic of China)|zh-TW:Chinese (Traditional, Taiwan)|cs:Czech|da:Danish|nl:Dutch|fi:Finnish|fr:French|gl:Galego|de:German|el:Greek|hu:Hungarian|id:Indonesian|it:Italian|ja:Japanese|ko:Korean|lv:Latvian|lo:Lao|ms:Malay (Malaysia)|nb:Norwegian|pl:Polish|pt:Portuguese (Brazil)|pt-PT:Portuguese (Portugal)|ro:Romanian|ru:Russian|sk:Slovak|sl:Slovenian|es:Spanish|sv:Swedish|tr:Turkish|uk:Ukrainian|vi:Vietnamese|aa-AA: Test Language"/>
<add key="files.docservice.token.useforrequest" value="true" />
<add key="files.docservice.languages" value="en:English|hy:Armenian|az:Azerbaijani|eu:Basque|be:Belarusian|bg:Bulgarian|ca:Catalan|zh:Chinese (Simplified)|zh-TW:Chinese (Traditional)|cs:Czech|da:Danish|nl:Dutch|fi:Finnish|fr:French|gl:Galego|de:German|el:Greek|hu:Hungarian|id:Indonesian|it:Italian|ja:Japanese|ko:Korean|lo:Lao|lv:Latvian|ms:Malay (Malaysia)|no:Norwegian|pl:Polish|pt:Portuguese (Brazil)|pt-PT:Portuguese (Portugal)|ro:Romanian|ru:Russian|si:Sinhala (Sri Lanka)|sk:Slovak|sl:Slovenian|es:Spanish|sv:Swedish|tr:Turkish|uk:Ukrainian|vi:Vietnamese|aa-AA: Test Language"/>
<add key="files.docservice.url.site" value="http://documentserver/"/>

View File

@ -1,19 +0,0 @@
# Eclipse
.classpath
.project
.settings/
# Intellij
.idea/
*.iml
*.iws
# Mac
.DS_Store
# Maven
log/
target/
#project
documents

View File

@ -1,8 +1,17 @@
ONLYOFFICE Applications example uses code from the following 3rd party projects:
jQuery - jQuery is a new kind of JavaScript Library. jQuery is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development. jQuery is designed to change the way that you write JavaScript. NOTE: This package is maintained on behalf of the library owners by the NuGet Community Packages project at https://nugetpackages.codeplex.com/ (https://jquery.org/license/)
License: MIT
License File: jQuery.license
Gson - Gson is a Java library that can be used to convert Java Objects into their JSON representation. (https://github.com/google/gson/blob/master/LICENSE)
License: Apache 2.0
License File: gson.license
H2 Database Engine - This software contains unmodified binary redistributions for H2 database engine. H2 is a relational DBMS that can be embedded in java applications. (https://h2database.com/html/license.html)
License: MPL 2.0 or EPL 1.0
License File: h2database.license
Jackson Databind - General-purpose data-binding functionality and tree-model for Jackson Data Processor. (https://github.com/FasterXML/jackson-databind/blob/master/LICENSE)
License: Apache 2.0
License File: jackson-databind.license
jQuery.BlockUI - The jQuery BlockUI Plugin lets you simulate synchronous behavior when using AJAX, without locking the browser. (https://github.com/malsup/blockui/)
License: MIT, GPL
@ -16,10 +25,30 @@ jQuery.iframe-transport - jQuery Iframe Transport Plugin for File Upload (https:
License: MIT
License File: jQuery.iframe-transport.license
jQuery - jQuery is a new kind of JavaScript Library. jQuery is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development. jQuery is designed to change the way that you write JavaScript. NOTE: This package is maintained on behalf of the library owners by the NuGet Community Packages project at https://nugetpackages.codeplex.com/ (https://jquery.org/license/)
License: MIT
License File: jQuery.license
jQuery.Migrate - Upgrading libraries such as jQuery can be a lot of work, when breaking changes have been introduced. jQuery Migrate makes this easier, by restoring the APIs that were removed, and additionally shows warnings in the browser console (development version of jQuery Migrate only) when removed and/or deprecated APIs are used. (https://github.com/jquery/jquery-migrate/blob/main/LICENSE.txt)
License: OpenJS
License File: jQuery.Migrate.license
jQuery.UI - jQuery UI is an open source library of interface components — interactions, full-featured widgets, and animation effects — based on the stellar jQuery javascript library . Each component is built according to jQuery's event-driven architecture (find something, manipulate it) and is themeable, making it easy for developers of any skill level to integrate and extend into their own code. (https://jquery.org/license/)
License: MIT
License File: jQuery.UI.license
JSON.simple - JSON.simple is a simple Java toolkit for JSON. You can use JSON.simple to encode or decode JSON text. (https://github.com/fangyidong/json-simple/blob/master/LICENSE.txt)
License: Apache 2.0
License File: JSON.simple.license
Project Lombok - Project Lombok is a java library that automatically plugs into your editor and build tools. (https://mvnrepository.com/artifact/org.projectlombok/lombok).
License: MIT
License File lombok.license
ModelMapper - ModelMapper is an intelligent object mapping library that automatically maps objects to each other. (https://github.com/modelmapper/modelmapper)
License: Apache 2.0
License File modelmapper.license
Prime JWT - is intended to be fast and easy to use. Prime JWT has a single external dependency on Jackson. (https://github.com/ws-apps/prime-jwt/blob/master/LICENSE)
License: Apache 2.0
License File: prime-jwt.license
@ -39,27 +68,3 @@ License File: spring-boot.license
Spring Data JPA - Persist data in SQL stores with Java Persistence API using Spring Data and Hibernate. (https://github.com/spring-projects/spring-data-jpa/blob/main/LICENSE.txt)
License: Apache 2.0
License File: spring-data-jpa.license
H2 Database Engine - This software contains unmodified binary redistributions for H2 database engine. H2 is a relational DBMS that can be embedded in java applications. (https://h2database.com/html/license.html)
License: MPL 2.0 or EPL 1.0
License File: h2database.license
JSON.simple - JSON.simple is a simple Java toolkit for JSON. You can use JSON.simple to encode or decode JSON text. (https://github.com/fangyidong/json-simple/blob/master/LICENSE.txt)
License: Apache 2.0
License File: JSON.simple.license
Gson - Gson is a Java library that can be used to convert Java Objects into their JSON representation. (https://github.com/google/gson/blob/master/LICENSE)
License: Apache 2.0
License File: gson.license
Jackson Databind - General-purpose data-binding functionality and tree-model for Jackson Data Processor. (https://github.com/FasterXML/jackson-databind/blob/master/LICENSE)
License: Apache 2.0
License File: jackson-databind.license
ModelMapper - ModelMapper is an intelligent object mapping library that automatically maps objects to each other. (https://github.com/modelmapper/modelmapper)
License: Apache 2.0
License File modelmapper.license
Project Lombok - Project Lombok is a java library that automatically plugs into your editor and build tools. (https://mvnrepository.com/artifact/org.projectlombok/lombok).
License: MIT
License File lombok.license

View File

@ -1,8 +1,17 @@
ONLYOFFICE Applications example uses code from the following 3rd party projects:
jQuery - jQuery is a new kind of JavaScript Library. jQuery is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development. jQuery is designed to change the way that you write JavaScript. NOTE: This package is maintained on behalf of the library owners by the NuGet Community Packages project at https://nugetpackages.codeplex.com/ (https://jquery.org/license/)
License: MIT
License File: jQuery.license
Gson - Gson is a Java library that can be used to convert Java Objects into their JSON representation. (https://github.com/google/gson/blob/master/LICENSE)
License: Apache 2.0
License File: gson.license
H2 Database Engine - This software contains unmodified binary redistributions for H2 database engine. H2 is a relational DBMS that can be embedded in java applications. (https://h2database.com/html/license.html)
License: MPL 2.0 or EPL 1.0
License File: h2database.license
Jackson Databind - General-purpose data-binding functionality and tree-model for Jackson Data Processor. (https://github.com/FasterXML/jackson-databind/blob/master/LICENSE)
License: Apache 2.0
License File: jackson-databind.license
jQuery.BlockUI - The jQuery BlockUI Plugin lets you simulate synchronous behavior when using AJAX, without locking the browser. (https://github.com/malsup/blockui/)
License: MIT, GPL
@ -16,10 +25,30 @@ jQuery.iframe-transport - jQuery Iframe Transport Plugin for File Upload (https:
License: MIT
License File: jQuery.iframe-transport.license
jQuery - jQuery is a new kind of JavaScript Library. jQuery is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development. jQuery is designed to change the way that you write JavaScript. NOTE: This package is maintained on behalf of the library owners by the NuGet Community Packages project at https://nugetpackages.codeplex.com/ (https://jquery.org/license/)
License: MIT
License File: jQuery.license
jQuery.Migrate - Upgrading libraries such as jQuery can be a lot of work, when breaking changes have been introduced. jQuery Migrate makes this easier, by restoring the APIs that were removed, and additionally shows warnings in the browser console (development version of jQuery Migrate only) when removed and/or deprecated APIs are used. (https://github.com/jquery/jquery-migrate/blob/main/LICENSE.txt)
License: OpenJS
License File: jQuery.Migrate.license
jQuery.UI - jQuery UI is an open source library of interface components — interactions, full-featured widgets, and animation effects — based on the stellar jQuery javascript library . Each component is built according to jQuery's event-driven architecture (find something, manipulate it) and is themeable, making it easy for developers of any skill level to integrate and extend into their own code. (https://jquery.org/license/)
License: MIT
License File: jQuery.UI.license
JSON.simple - JSON.simple is a simple Java toolkit for JSON. You can use JSON.simple to encode or decode JSON text. (https://github.com/fangyidong/json-simple/blob/master/LICENSE.txt)
License: Apache 2.0
License File: JSON.simple.license
Project Lombok - Project Lombok is a java library that automatically plugs into your editor and build tools. (https://mvnrepository.com/artifact/org.projectlombok/lombok).
License: MIT
License File lombok.license
ModelMapper - ModelMapper is an intelligent object mapping library that automatically maps objects to each other. (https://github.com/modelmapper/modelmapper)
License: Apache 2.0
License File modelmapper.license
Prime JWT - is intended to be fast and easy to use. Prime JWT has a single external dependency on Jackson. (https://github.com/ws-apps/prime-jwt/blob/master/LICENSE)
License: Apache 2.0
License File: prime-jwt.license
@ -39,19 +68,3 @@ License File: spring-boot.license
Spring Data JPA - Persist data in SQL stores with Java Persistence API using Spring Data and Hibernate. (https://github.com/spring-projects/spring-data-jpa/blob/main/LICENSE.txt)
License: Apache 2.0
License File: spring-data-jpa.license
H2 Database Engine - This software contains unmodified binary redistributions for H2 database engine. H2 is a relational DBMS that can be embedded in java applications. (https://h2database.com/html/license.html)
License: MPL 2.0 or EPL 1.0
License File: h2database.license
JSON.simple - JSON.simple is a simple Java toolkit for JSON. You can use JSON.simple to encode or decode JSON text. (https://github.com/fangyidong/json-simple/blob/master/LICENSE.txt)
License: Apache 2.0
License File: JSON.simple.license
Gson - Gson is a Java library that can be used to convert Java Objects into their JSON representation. (https://github.com/google/gson/blob/master/LICENSE)
License: Apache 2.0
License File: gson.license
Jackson Databind - General-purpose data-binding functionality and tree-model for Jackson Data Processor. (https://github.com/FasterXML/jackson-databind/blob/master/LICENSE)
License: Apache 2.0
License File: jackson-databind.license

View File

@ -0,0 +1,36 @@
Copyright OpenJS Foundation and other contributors, https://openjsf.org/
This software consists of voluntary contributions made by many
individuals. For exact contribution history, see the revision history
available at https://github.com/jquery/jquery-migrate
The following license applies to all parts of this software except as
documented below:
====
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
====
All files located in the node_modules and external directories are
externally maintained libraries used by this software which have their
own licenses; we recommend you read them, as their terms may differ from
the terms above.

View File

@ -1,4 +1,4 @@
Copyright (c) 2009 John Resig, http://jquery.com/
Copyright OpenJS Foundation and other contributors, https://openjsf.org/
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the

View File

@ -45,6 +45,7 @@ public class ExampleData {
"Cant see anyones information",
"Can't rename files from the editor",
"Can't view chat",
"Can't protect file",
"View file without collaboration"
);
@ -92,22 +93,23 @@ public class ExampleData {
userService.createUser("John Smith", "smith@example.com", descriptionUserFirst,
"", List.of(FilterState.NULL.toString()), List.of(FilterState.NULL.toString()),
List.of(FilterState.NULL.toString()), List.of(FilterState.NULL.toString()),
List.of(FilterState.NULL.toString()), null, true);
List.of(FilterState.NULL.toString()), null, true, true);
// create user 2 with the specified parameters
userService.createUser("Mark Pottato", "pottato@example.com", descriptionUserSecond,
"group-2", List.of("", "group-2"), List.of(FilterState.NULL.toString()),
List.of("group-2", ""), List.of("group-2"), List.of("group-2", ""), true, true);
List.of("group-2", ""), List.of("group-2"), List.of("group-2", ""), true, true,
true);
// create user 3 with the specified parameters
userService.createUser("Hamish Mitchell", "mitchell@example.com", descriptionUserThird,
"group-3", List.of("group-2"), List.of("group-2", "group-3"), List.of("group-2"),
new ArrayList<>(), List.of("group-2"), false, true);
new ArrayList<>(), List.of("group-2"), false, true, true);
// create user 0 with the specified parameters
userService.createUser("Anonymous", null, descriptionUserZero, "",
List.of(FilterState.NULL.toString()), List.of(FilterState.NULL.toString()),
List.of(FilterState.NULL.toString()), List.of(FilterState.NULL.toString()),
new ArrayList<>(), null, false);
new ArrayList<>(), null, false, false);
}
}

View File

@ -19,11 +19,14 @@
package com.onlyoffice.integration.controllers;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.onlyoffice.integration.documentserver.callbacks.CallbackHandler;
import com.onlyoffice.integration.documentserver.managers.jwt.JwtManager;
import com.onlyoffice.integration.documentserver.storage.FileStorageMutator;
import com.onlyoffice.integration.documentserver.storage.FileStoragePathBuilder;
import com.onlyoffice.integration.dto.Converter;
import com.onlyoffice.integration.dto.ConvertedData;
import com.onlyoffice.integration.dto.Track;
import com.onlyoffice.integration.entities.User;
import com.onlyoffice.integration.documentserver.models.enums.DocumentType;
@ -33,6 +36,7 @@ import com.onlyoffice.integration.documentserver.util.service.ServiceConverter;
import com.onlyoffice.integration.documentserver.managers.document.DocumentManager;
import com.onlyoffice.integration.documentserver.managers.callback.CallbackManager;
import org.json.simple.JSONObject;
import org.json.simple.parser.JSONParser;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.core.io.Resource;
@ -51,14 +55,17 @@ import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletRequest;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.net.InetAddress;
import java.net.URL;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.nio.file.Path;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Optional;
@ -198,15 +205,18 @@ public class FileController {
// get document type (word, cell or slide)
DocumentType type = fileUtility.getDocumentType(fileName);
// get an editor internal extension (".docx", ".xlsx" or ".pptx")
String internalFileExt = fileUtility.getInternalExtension(type);
// convert to .ooxml
String internalFileExt = "ooxml";
try {
// check if the file with such an extension can be converted
if (fileUtility.getConvertExts().contains(fileExt)) {
String key = serviceConverter.generateRevisionId(fileUri); // generate document key
String newFileUri = serviceConverter // get the URL to the converted file
.getConvertedUri(fileUri, fileExt, internalFileExt, key, filePass, true, lang);
ConvertedData response = serviceConverter // get the URL to the converted file
.getConvertedData(fileUri, fileExt, internalFileExt, key, filePass, true, lang);
String newFileUri = response.getUri();
String newFileType = "." + response.getFileType();
if (newFileUri.isEmpty()) {
return "{ \"step\" : \"0\", \"filename\" : \"" + fileName + "\"}";
@ -214,7 +224,7 @@ public class FileController {
/* get a file name of an internal file extension with an index if the file
with such a name already exists */
String nameWithInternalExt = fileUtility.getFileNameWithoutExtension(fileName) + internalFileExt;
String nameWithInternalExt = fileUtility.getFileNameWithoutExtension(fileName) + newFileType;
String correctedName = documentManager.getCorrectName(nameWithInternalExt);
URL url = new URL(newFileUri);
@ -226,6 +236,9 @@ public class FileController {
throw new RuntimeException("Input stream is null");
}
// remove source file
storageMutator.deleteFile(fileName);
// create the converted file with input stream
storageMutator.createFile(Path.of(storagePathBuilder.getFileLocation(correctedName)), stream);
fileName = correctedName;
@ -266,7 +279,7 @@ public class FileController {
@RequestParam("file") final String file) { // history file
try {
// check if a token is enabled or not
if (jwtManager.tokenEnabled()) {
if (jwtManager.tokenEnabled() && jwtManager.tokenUseForRequest()) {
String header = request.getHeader(documentJwtHeader == null // get the document JWT header
|| documentJwtHeader.isEmpty() ? "Authorization" : documentJwtHeader);
if (header != null && !header.isEmpty()) {
@ -286,10 +299,11 @@ public class FileController {
@GetMapping(path = "${url.download}")
public ResponseEntity<Resource> download(final HttpServletRequest request, // download a file
@RequestParam("fileName") final String fileName,
@RequestParam(value = "userAddress", required = false) final String userAddress){
@RequestParam(value = "userAddress", required = false)
final String userAddress) {
try {
// check if a token is enabled or not
if (jwtManager.tokenEnabled() && userAddress != null) {
if (jwtManager.tokenEnabled() && userAddress != null && jwtManager.tokenUseForRequest()) {
String header = request.getHeader(documentJwtHeader == null // get the document JWT header
|| documentJwtHeader.isEmpty() ? "Authorization" : documentJwtHeader);
if (header != null && !header.isEmpty()) {
@ -445,4 +459,73 @@ public class FileController {
return e.getMessage();
}
}
@PostMapping("/reference")
@ResponseBody
public String reference(@RequestBody final JSONObject body) {
try {
JSONParser parser = new JSONParser();
Gson gson = new GsonBuilder().disableHtmlEscaping().create();
String userAddress = "";
String fileName = "";
if (body.containsKey("referenceData")) {
LinkedHashMap referenceDataObj = (LinkedHashMap) body.get("referenceData");
String instanceId = (String) referenceDataObj.get("instanceId");
if (instanceId.equals(storagePathBuilder.getServerUrl(false))) {
JSONObject fileKey = (JSONObject) parser.parse((String) referenceDataObj.get("fileKey"));
userAddress = (String) fileKey.get("userAddress");
if (userAddress.equals(InetAddress.getLocalHost().getHostAddress())) {
fileName = (String) fileKey.get("fileName");
}
}
}
if (fileName.equals("")) {
try {
String path = (String) body.get("path");
path = fileUtility.getFileName(path);
File f = new File(storagePathBuilder.getFileLocation(path));
if (f.exists()) {
fileName = path;
}
} catch (Exception e) {
return "{ \"error\" : 1, \"message\" : \"" + e.getMessage() + "\"}";
}
}
if (fileName.equals("")) {
return "{ \"error\": \"File not found\"}";
}
boolean directUrl = (boolean) body.get("directUrl");
HashMap<String, Object> fileKey = new HashMap<>();
fileKey.put("fileName", fileName);
fileKey.put("userAddress", InetAddress.getLocalHost().getHostAddress());
HashMap<String, Object> referenceData = new HashMap<>();
referenceData.put("instanceId", storagePathBuilder.getServerUrl(true));
referenceData.put("fileKey", gson.toJson(fileKey));
HashMap<String, Object> data = new HashMap<>();
data.put("fileType", fileUtility.getFileExtension(fileName).replace(".", ""));
data.put("url", documentManager.getDownloadUrl(fileName, true));
data.put("directUrl", directUrl ? documentManager.getDownloadUrl(fileName, false) : null);
data.put("referenceData", referenceData);
data.put("path", fileName);
if (jwtManager.tokenEnabled()) {
String token = jwtManager.createToken(data);
data.put("token", token);
}
return gson.toJson(data);
} catch (Exception e) {
e.printStackTrace();
return "{ \"error\" : 1, \"message\" : \"" + e.getMessage() + "\"}";
}
}
}

View File

@ -127,9 +127,9 @@ public class DefaultCallbackManager implements CallbackManager {
if (!curExt.equals(downloadExt)) {
try {
String newFileUri = serviceConverter
.getConvertedUri(downloadUri, downloadExt, curExt,
.getConvertedData(downloadUri, downloadExt, curExt,
serviceConverter.generateRevisionId(downloadUri), null, false,
null); // convert a file and get URL to a new file
null).getUri(); // convert a file and get URL to a new file
if (newFileUri.isEmpty()) {
newFileName = documentManager
.getCorrectName(fileUtility.getFileNameWithoutExtension(fileName)
@ -211,7 +211,8 @@ public class DefaultCallbackManager implements CallbackManager {
}
String headerToken;
if (jwtManager.tokenEnabled()) { // check if a secret key to generate token exists or not
// check if a secret key to generate token exists or not
if (jwtManager.tokenEnabled() && jwtManager.tokenUseForRequest()) {
Map<String, Object> payloadMap = new HashMap<>();
payloadMap.put("payload", params);
headerToken = jwtManager.createToken(payloadMap); // encode a payload object into a header token
@ -276,8 +277,8 @@ public class DefaultCallbackManager implements CallbackManager {
try {
// convert file and get URL to a new file
String newFileUri = serviceConverter
.getConvertedUri(downloadUri, downloadExt, curExt, serviceConverter
.generateRevisionId(downloadUri), null, false, null);
.getConvertedData(downloadUri, downloadExt, curExt, serviceConverter
.generateRevisionId(downloadUri), null, false, null).getUri();
if (newFileUri.isEmpty()) {
newFileName = true;
} else {

View File

@ -37,6 +37,8 @@ import java.util.Map;
public class DefaultJwtManager implements JwtManager {
@Value("${files.docservice.secret}")
private String tokenSecret;
@Value("${files.docservice.token-use-for-request}")
private String tokenUseForRequest;
@Autowired
private ObjectMapper objectMapper;
@Autowired
@ -62,6 +64,10 @@ public class DefaultJwtManager implements JwtManager {
return tokenSecret != null && !tokenSecret.isEmpty();
}
public boolean tokenUseForRequest() {
return Boolean.parseBoolean(tokenUseForRequest) && !tokenUseForRequest.isEmpty();
}
// read document token
public JWT readToken(final String token) {
try {
@ -84,7 +90,7 @@ public class DefaultJwtManager implements JwtManager {
} catch (Exception ex) {
throw new RuntimeException("{\"error\":1,\"message\":\"JSON Parsing error\"}");
}
if (tokenEnabled()) { // check if the token is enabled
if (tokenEnabled() && tokenUseForRequest()) { // check if the token is enabled
String token = (String) body.get("token"); // get token from the body
if (token == null) { // if token is empty
if (header != null && !header.isBlank()) { // and the header is defined

View File

@ -26,6 +26,7 @@ import java.util.Map;
// specify the jwt manager functions
public interface JwtManager {
boolean tokenEnabled(); // check if the token is enabled
boolean tokenUseForRequest(); // check if the token is enabled
String createToken(Map<String, Object> payloadClaims); // create document token
JWT readToken(String token); // read document token
JSONObject parseBody(String payload, String header); // parse the body

View File

@ -27,5 +27,6 @@ public enum Action {
comment,
chat,
fillForms,
blockcontent
blockcontent,
protect
}

View File

@ -25,6 +25,8 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;
import java.util.HashMap;
@Component
@Scope("prototype")
@Getter
@ -43,4 +45,5 @@ public class Document { // the parameters pertaining to the document (title, ur
as file name when the document is downloaded */
private String url; // the absolute URL where the source viewed or edited document is stored
private String directUrl;
private HashMap<String, Object> referenceData;
}

View File

@ -51,4 +51,5 @@ public class Permission extends AbstractModel { // the permission for the docum
private CommentGroup commentGroups; // the groups whose comments the user can edit, remove and/or view
@JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = SerializerFilter.class)
private List<String> userInfoGroups;
private Boolean protect = true;
}

View File

@ -0,0 +1,42 @@
/**
*
* (c) Copyright Ascensio System SIA 2023
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package com.onlyoffice.integration.documentserver.models.filemodel;
import java.util.HashMap;
import java.util.Map;
import com.onlyoffice.integration.documentserver.storage.FileStoragePathBuilder;
import org.springframework.beans.factory.annotation.Autowired;
public class ReferenceData {
@Autowired
private FileStoragePathBuilder storagePathBuilder;
private final String instanceId;
private final Map<String, String> fileKey;
public ReferenceData(final String fileName, final String curUserHostAddress, final User user) {
instanceId = storagePathBuilder.getServerUrl(true);
Map<String, String> fileKeyList = new HashMap<>();
if (!user.getId().equals("uid-0")) {
fileKeyList.put("fileName", fileName);
fileKeyList.put("userAddress", curUserHostAddress);
} else {
fileKeyList = null;
}
fileKey = fileKeyList;
}
}

View File

@ -23,6 +23,7 @@ import com.onlyoffice.integration.documentserver.managers.jwt.JwtManager;
import com.onlyoffice.integration.documentserver.models.enums.ConvertErrorType;
import com.onlyoffice.integration.documentserver.util.file.FileUtility;
import com.onlyoffice.integration.dto.Convert;
import com.onlyoffice.integration.dto.ConvertedData;
import lombok.SneakyThrows;
import org.json.simple.JSONObject;
import org.json.simple.parser.JSONParser;
@ -105,17 +106,17 @@ public class DefaultServiceConverter implements ServiceConverter {
connection.connect();
try (OutputStream os = connection.getOutputStream()) {
os.write(bodyByte); // write bytes to the output stream
os.flush(); // force write data to the output stream that can be cached in the current thread
}
int statusCode = connection.getResponseCode();
if (statusCode != HttpStatus.OK.value()) { // checking status code
connection.disconnect();
throw new RuntimeException("Convertation service returned status: " + statusCode);
}
try (OutputStream os = connection.getOutputStream()) {
os.write(bodyByte); // write bytes to the output stream
os.flush(); // force write data to the output stream that can be cached in the current thread
}
response = connection.getInputStream(); // get the input stream
jsonString = convertStreamToString(response); // convert the response stream into a string
} finally {
@ -125,9 +126,9 @@ public class DefaultServiceConverter implements ServiceConverter {
}
// get the URL to the converted file
public String getConvertedUri(final String documentUri, final String fromExtension,
final String toExtension, final String documentRevisionId,
final String filePass, final Boolean isAsync, final String lang) {
public ConvertedData getConvertedData(final String documentUri, final String fromExtension,
final String toExtension, final String documentRevisionId,
final String filePass, final Boolean isAsync, final String lang) {
// check if the fromExtension parameter is defined; if not, get it from the document url
String fromExt = fromExtension == null || fromExtension.isEmpty()
? fileUtility.getFileExtension(documentUri) : fromExtension;
@ -155,7 +156,7 @@ public class DefaultServiceConverter implements ServiceConverter {
}
String headerToken = "";
if (jwtManager.tokenEnabled()) {
if (jwtManager.tokenEnabled() && jwtManager.tokenUseForRequest()) {
HashMap<String, Object> map = new HashMap<String, Object>();
map.put("region", lang);
map.put("url", body.getUrl());
@ -179,7 +180,7 @@ public class DefaultServiceConverter implements ServiceConverter {
String jsonString = postToServer(body, headerToken);
return getResponseUri(jsonString);
return getResponseData(jsonString);
}
// generate document key
@ -203,7 +204,7 @@ public class DefaultServiceConverter implements ServiceConverter {
// get the response URL
@SneakyThrows
private String getResponseUri(final String jsonString) {
private ConvertedData getResponseData(final String jsonString) {
JSONObject jsonObj = convertStringToJSON(jsonString);
Object error = jsonObj.get("error");
@ -216,10 +217,15 @@ public class DefaultServiceConverter implements ServiceConverter {
Long resultPercent = 0L;
String responseUri = null;
String responseFileType = null;
ConvertedData convertedData = new ConvertedData("", "");
if (isEndConvert) { // if the conversion is completed
resultPercent = FULL_LOADING_IN_PERCENT;
responseUri = (String) jsonObj.get("fileUrl"); // get the file URL
responseFileType = (String) jsonObj.get("fileType"); // get the file type
convertedData.setUri(responseUri);
convertedData.setFileType(responseFileType);
} else { // if the conversion isn't completed
resultPercent = (Long) jsonObj.get("percent");
@ -227,7 +233,7 @@ public class DefaultServiceConverter implements ServiceConverter {
resultPercent = resultPercent >= FULL_LOADING_IN_PERCENT ? FULL_LOADING_IN_PERCENT - 1 : resultPercent;
}
return resultPercent >= FULL_LOADING_IN_PERCENT ? responseUri : "";
return convertedData;
}
// convert stream to string

View File

@ -18,15 +18,16 @@
package com.onlyoffice.integration.documentserver.util.service;
import com.onlyoffice.integration.dto.ConvertedData;
import org.json.simple.JSONObject;
import java.io.InputStream;
// specify the converter service functions
public interface ServiceConverter {
String getConvertedUri(String documentUri, String fromExtension, // get the URL to the converted file
String toExtension, String documentRevisionId,
String filePass, Boolean isAsync, String lang);
ConvertedData getConvertedData(String documentUri, String fromExtension, // get the URL to the converted file
String toExtension, String documentRevisionId,
String filePass, Boolean isAsync, String lang);
String generateRevisionId(String expectedKey); // generate document key
String convertStreamToString(InputStream stream); // convert stream to string
JSONObject convertStringToJSON(String jsonString); // convert string to json

View File

@ -0,0 +1,33 @@
/**
*
* (c) Copyright Ascensio System SIA 2023
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package com.onlyoffice.integration.dto;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
@Getter
@Setter
@AllArgsConstructor
@NoArgsConstructor
public class ConvertedData {
private String uri;
private String fileType;
}

View File

@ -52,4 +52,5 @@ public class Permission extends AbstractEntity {
private List<Group> commentsRemoveGroups;
@ManyToMany
private List<Group> userInfoGroups;
private Boolean protect = true;
}

View File

@ -38,7 +38,8 @@ public class PermissionServices {
final List<Group> commentEditGroups,
final List<Group> commentRemoveGroups,
final List<Group> userInfoGroups,
final Boolean chat) {
final Boolean chat,
final Boolean protect) {
Permission permission = new Permission();
permission.setReviewGroups(reviewGroups); // define the groups whose changes the user can accept/reject
@ -48,6 +49,7 @@ public class PermissionServices {
whose comments the user can remove */
permission.setUserInfoGroups(userInfoGroups);
permission.setChat(chat);
permission.setProtect(protect);
permissionRepository.save(permission); // save new permissions

View File

@ -57,7 +57,8 @@ public class UserServices {
final List<String> editGroups,
final List<String> removeGroups,
final List<String> userInfoGroups, final Boolean favoriteDoc,
final Boolean chat) {
final Boolean chat,
final Boolean protect) {
User newUser = new User();
newUser.setName(name); // set the user name
newUser.setEmail(email); // set the user email
@ -81,7 +82,8 @@ public class UserServices {
commentGroupsEdit,
commentGroupsRemove,
usInfoGroups,
chat); // specify permissions for the current user
chat,
protect); // specify permissions for the current user
newUser.setPermissions(permission);
userRepository.save(newUser); // save a new user

View File

@ -18,6 +18,7 @@
package com.onlyoffice.integration.services.configurers.implementations;
import com.google.gson.Gson;
import com.onlyoffice.integration.documentserver.models.filemodel.Document;
import com.onlyoffice.integration.documentserver.models.filemodel.Permission;
import com.onlyoffice.integration.documentserver.storage.FileStoragePathBuilder;
@ -31,6 +32,8 @@ import org.springframework.context.annotation.Primary;
import org.springframework.stereotype.Service;
import java.io.File;
import java.net.InetAddress;
import java.util.HashMap;
@Service
@Primary
@ -71,7 +74,20 @@ public class DefaultDocumentConfigurer implements DocumentConfigurer<DefaultDocu
+ "/" + fileName + "/"
+ new File(storagePathBuilder.getFileLocation(fileName)).lastModified());
Gson gson = new Gson();
HashMap<String, String> fileKey = new HashMap<>();
fileKey.put("fileName", fileName);
try {
fileKey.put("userAddress", InetAddress.getLocalHost().getHostAddress());
} catch (Exception e) {
e.printStackTrace();
}
HashMap<String, Object> referenceData = new HashMap<>();
referenceData.put("instanceId", storagePathBuilder.getServerUrl(true));
referenceData.put("fileKey", gson.toJson(fileKey));
document.setKey(key); // set the key to the document config
document.setPermissions(permission); // set the permission parameters to the document config
document.setReferenceData(referenceData);
}
}

View File

@ -19,6 +19,7 @@
package com.onlyoffice.integration.services.configurers.wrappers;
import com.onlyoffice.integration.documentserver.models.filemodel.Permission;
import com.onlyoffice.integration.documentserver.models.filemodel.ReferenceData;
import lombok.Builder;
import lombok.Getter;
@ -29,4 +30,5 @@ public class DefaultDocumentWrapper {
private String fileName;
private Boolean favorite;
private Boolean isEnableDirectUrl;
private ReferenceData referenceData;
}

View File

@ -1,4 +1,4 @@
server.version=1.5.0
server.version=1.6.0
server.address=
server.port=4000
@ -8,10 +8,10 @@ filesize-max=5242880
files.storage=
files.storage.folder=documents
files.docservice.fillforms-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|.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.fillforms-docs=.docx|.oform
files.docservice.viewed-docs=.djvu|.oxps|.pdf|.xps
files.docservice.edited-docs=.csv|.docm|.docx|.docxf|.dotm|.dotx|.epub|.fb2|.html|.odp|.ods|.odt|.otp|.ots|.ott|.potm|.potx|.ppsm|.ppsx|.pptm|.pptx|.rtf|.txt|.xlsm|.xlsx|.xltm|.xltx
files.docservice.convert-docs=.doc|.dot|.dps|.dpt|.epub|.et|.ett|.fb2|.fodp|.fods|.fodt|.htm|.html|.mht|.mhtml|.odp|.ods|.odt|.otp|.ots|.ott|.pot|.pps|.ppt|.rtf|.stw|.sxc|.sxi|.sxw|.wps|.wpt|.xls|.xlsb|.xlt|.xml
files.docservice.timeout=120000
files.docservice.history.postfix=-hist
@ -24,10 +24,11 @@ files.docservice.url.example=
files.docservice.secret=
files.docservice.header=Authorization
files.docservice.token-use-for-request=true
files.docservice.verify-peer-off=true
files.docservice.languages=en:English|hy:Armenian|az:Azerbaijani|eu:Basque|be:Belarusian|bg:Bulgarian|ca:Catalan|zh:Chinese (People's Republic of China)|zh-TW:Chinese (Traditional, Taiwan)|cs:Czech|da:Danish|nl:Dutch|fi:Finnish|fr:French|gl:Galego|de:German|el:Greek|hu:Hungarian|id:Indonesian|it:Italian|ja:Japanese|ko:Korean|lv:Latvian|lo:Lao|ms:Malay (Malaysia)|nb:Norwegian|pl:Polish|pt:Portuguese (Brazil)|pt-PT:Portuguese (Portugal)|ro:Romanian|ru:Russian|sk:Slovak|sl:Slovenian|es:Spanish|sv:Swedish|tr:Turkish|uk:Ukrainian|vi:Vietnamese|aa-AA:Test Language
files.docservice.languages=en:English|hy:Armenian|az:Azerbaijani|eu:Basque|be:Belarusian|bg:Bulgarian|ca:Catalan|zh:Chinese (Simplified)|zh-TW:Chinese (Traditional)|cs:Czech|da:Danish|nl:Dutch|fi:Finnish|fr:French|gl:Galego|de:German|el:Greek|hu:Hungarian|id:Indonesian|it:Italian|ja:Japanese|ko:Korean|lo:Lao|lv:Latvian|ms:Malay (Malaysia)|no:Norwegian|pl:Polish|pt:Portuguese (Brazil)|pt-PT:Portuguese (Portugal)|ro:Romanian|ru:Russian|si:Sinhala (Sri Lanka)|sk:Slovak|sl:Slovenian|es:Spanish|sv:Swedish|tr:Turkish|uk:Ukrainian|vi:Vietnamese|aa-AA:Test Language
spring.datasource.url=jdbc:h2:mem:usersdb
spring.datasource.driverClassName=org.h2.Driver
@ -37,6 +38,8 @@ spring.jpa.database-platform=org.hibernate.dialect.H2Dialect
hibernate.ddl-auto
spring.h2.console.enabled=true
spring.h2.console.path=/h2
spring.servlet.multipart.max-file-size=5MB
spring.servlet.multipart.max-request-size=5MB
url.index=/
url.converter=/converter

View File

@ -668,4 +668,9 @@
.main-panel > span{
max-width:15%;
}
}
}
@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
.tableRow td:first-child{
max-width: none;
}
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -211,14 +211,10 @@ if (typeof jQuery !== "undefined") {
setCookie("ulang", langSel.val());
});
if(!userId){
jq(document).on("ready",function(){
setCookie("uid",1)
})
setCookie("uid",1);
}
if(!langId){
jq(document).on("ready",function () {
setCookie("ulang","en")
})
setCookie("ulang","en");
}
};

View File

@ -52,7 +52,7 @@
// the user is trying to switch the document from the viewing into the editing mode
var onRequestEditRights = function () {
location.href = location.href.replace(RegExp("\&?action=view\&?", "i"), "");
location.href = location.href.replace(RegExp("\&?action=view", "i"), "");
};
// an error or some other specific event occurs
@ -160,12 +160,23 @@
}
};
var onRequestReferenceData = function(event) { // user refresh external data source
event.data.directUrl = !!config.document.directUrl;
let xhr = new XMLHttpRequest();
xhr.open("POST", "reference");
xhr.setRequestHeader("Content-Type", "application/json");
xhr.send(JSON.stringify(event.data));
xhr.onload = function () {
innerAlert(xhr.responseText);
docEditor.setReferenceData(JSON.parse(xhr.responseText));
}
};
config.width = "100%";
config.height = "100%";
config.events = {
"onAppReady": onAppReady,
"onDocumentStateChange": onDocumentStateChange,
'onRequestEditRights': onRequestEditRights,
"onError": onError,
"onOutdatedVersion": onOutdatedVersion,
"onMakeActionLink": onMakeActionLink,
@ -211,6 +222,9 @@
};
// prevent file renaming for anonymous users
config.events['onRequestRename'] = onRequestRename;
config.events['onRequestReferenceData'] = onRequestReferenceData;
// prevent switch the document from the viewing into the editing mode for anonymous users
config.events['onRequestEditRights'] = onRequestEditRights;
}
if (config.editorConfig.createUrl) {

View File

@ -333,7 +333,8 @@
</div>
</footer>
<script type="text/javascript" src="scripts/jquery-1.8.2.js"></script>
<script type="text/javascript" src="scripts/jquery-3.6.4.min.js"></script>
<script type="text/javascript" src="scripts/jquery-migrate-3.4.1.min.js"></script>
<script type="text/javascript" src="scripts/jquery-ui.js"></script>
<script type="text/javascript" src="scripts/jquery.blockUI.js"></script>
<script type="text/javascript" src="scripts/jquery.iframe-transport.js"></script>

View File

@ -1,9 +1,5 @@
ONLYOFFICE Applications example uses code from the following 3rd party projects:
jQuery - jQuery is a new kind of JavaScript Library. jQuery is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development. jQuery is designed to change the way that you write JavaScript. NOTE: This package is maintained on behalf of the library owners by the NuGet Community Packages project at https://nugetpackages.codeplex.com/ (https://jquery.org/license/)
License: MIT
License File: jQuery.license
jQuery.BlockUI - The jQuery BlockUI Plugin lets you simulate synchronous behavior when using AJAX, without locking the browser. (https://github.com/malsup/blockui/)
License: MIT, GPL
License File: jQuery.BlockUI.license
@ -16,6 +12,14 @@ jQuery.iframe-transport - jQuery Iframe Transport Plugin for File Upload (https:
License: MIT
License File: jQuery.iframe-transport.license
jQuery - jQuery is a new kind of JavaScript Library. jQuery is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development. jQuery is designed to change the way that you write JavaScript. NOTE: This package is maintained on behalf of the library owners by the NuGet Community Packages project at https://nugetpackages.codeplex.com/ (https://jquery.org/license/)
License: MIT
License File: jQuery.license
jQuery.Migrate - Upgrading libraries such as jQuery can be a lot of work, when breaking changes have been introduced. jQuery Migrate makes this easier, by restoring the APIs that were removed, and additionally shows warnings in the browser console (development version of jQuery Migrate only) when removed and/or deprecated APIs are used. (https://github.com/jquery/jquery-migrate/blob/main/LICENSE.txt)
License: OpenJS
License File: jQuery.Migrate.license
jQuery.UI - jQuery UI is an open source library of interface components — interactions, full-featured widgets, and animation effects — based on the stellar jQuery javascript library . Each component is built according to jQuery's event-driven architecture (find something, manipulate it) and is themeable, making it easy for developers of any skill level to integrate and extend into their own code. (https://jquery.org/license/)
License: MIT
License File: jQuery.UI.license

View File

@ -1,9 +1,5 @@
ONLYOFFICE Applications example uses code from the following 3rd party projects:
jQuery - jQuery is a new kind of JavaScript Library. jQuery is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development. jQuery is designed to change the way that you write JavaScript. NOTE: This package is maintained on behalf of the library owners by the NuGet Community Packages project at https://nugetpackages.codeplex.com/ (https://jquery.org/license/)
License: MIT
License File: jQuery.license
jQuery.BlockUI - The jQuery BlockUI Plugin lets you simulate synchronous behavior when using AJAX, without locking the browser. (https://github.com/malsup/blockui/)
License: MIT, GPL
License File: jQuery.BlockUI.license
@ -16,6 +12,14 @@ jQuery.iframe-transport - jQuery Iframe Transport Plugin for File Upload (https:
License: MIT
License File: jQuery.iframe-transport.license
jQuery - jQuery is a new kind of JavaScript Library. jQuery is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development. jQuery is designed to change the way that you write JavaScript. NOTE: This package is maintained on behalf of the library owners by the NuGet Community Packages project at https://nugetpackages.codeplex.com/ (https://jquery.org/license/)
License: MIT
License File: jQuery.license
jQuery.Migrate - Upgrading libraries such as jQuery can be a lot of work, when breaking changes have been introduced. jQuery Migrate makes this easier, by restoring the APIs that were removed, and additionally shows warnings in the browser console (development version of jQuery Migrate only) when removed and/or deprecated APIs are used. (https://github.com/jquery/jquery-migrate/blob/main/LICENSE.txt)
License: OpenJS
License File: jQuery.Migrate.license
jQuery.UI - jQuery UI is an open source library of interface components — interactions, full-featured widgets, and animation effects — based on the stellar jQuery javascript library . Each component is built according to jQuery's event-driven architecture (find something, manipulate it) and is themeable, making it easy for developers of any skill level to integrate and extend into their own code. (https://jquery.org/license/)
License: MIT
License File: jQuery.UI.license

View File

@ -0,0 +1,36 @@
Copyright OpenJS Foundation and other contributors, https://openjsf.org/
This software consists of voluntary contributions made by many
individuals. For exact contribution history, see the revision history
available at https://github.com/jquery/jquery-migrate
The following license applies to all parts of this software except as
documented below:
====
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
====
All files located in the node_modules and external directories are
externally maintained libraries used by this software which have their
own licenses; we recommend you read them, as their terms may differ from
the terms above.

View File

@ -1,4 +1,4 @@
Copyright (c) 2009 John Resig, http://jquery.com/
Copyright OpenJS Foundation and other contributors, https://openjsf.org/
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the

View File

@ -19,6 +19,7 @@
package controllers;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import entities.FileType;
import entities.User;
import helpers.ConfigManager;
@ -63,7 +64,6 @@ import java.util.Scanner;
import static utils.Constants.KILOBYTE_SIZE;
@WebServlet(name = "IndexServlet", urlPatterns = {"/IndexServlet"})
@MultipartConfig
public class IndexServlet extends HttpServlet {
@ -78,6 +78,11 @@ public class IndexServlet extends HttpServlet {
return;
}
// charset for response headers if upload or convert
if (action.matches("upload|convert")) {
response.setCharacterEncoding("UTF-8");
}
DocumentManager.init(request, response);
// create a variable to display information about the application and error messages
@ -118,6 +123,9 @@ public class IndexServlet extends HttpServlet {
case "rename":
rename(request, response, writer);
break;
case "reference":
reference(request, response, writer);
break;
default:
break;
}
@ -262,16 +270,18 @@ public class IndexServlet extends HttpServlet {
String fileUri = DocumentManager.getDownloadUrl(fileName, true);
String fileExt = FileUtility.getFileExtension(fileName);
FileType fileType = FileUtility.getFileType(fileName);
String internalFileExt = DocumentManager.getInternalExtension(fileType);
String internalFileExt = "ooxml";
// check if the file with such an extension can be converted
if (DocumentManager.getConvertExts().contains(fileExt)) {
// generate document key
String key = ServiceConverter.generateRevisionId(fileUri);
// get the url to the converted file
String newFileUri = ServiceConverter
.getConvertedUri(fileUri, fileExt, internalFileExt, key, filePass, true, lang);
// get the url and file type to the converted file
Map<String, String> newFileData = ServiceConverter
.getConvertedData(fileUri, fileExt, internalFileExt, key, filePass, true, lang);
String newFileUri = newFileData.get("fileUrl");
String newFileType = "." + newFileData.get("fileType");
if (newFileUri.isEmpty()) {
writer.write("{ \"step\" : \"0\", \"filename\" : \"" + fileName + "\"}");
@ -281,7 +291,7 @@ public class IndexServlet extends HttpServlet {
/* get a file name of an internal file extension with an index if the file
with such a name already exists */
String correctName = DocumentManager.getCorrectName(FileUtility
.getFileNameWithoutExtension(fileName) + internalFileExt, null);
.getFileNameWithoutExtension(fileName) + newFileType, null);
URL url = new URL(newFileUri);
java.net.HttpURLConnection connection = (java.net.HttpURLConnection) url.openConnection();
@ -305,9 +315,9 @@ public class IndexServlet extends HttpServlet {
connection.disconnect();
// remove source file ?
// File sourceFile = new File(DocumentManager.StoragePath(fileName, null));
// sourceFile.delete();
// remove source file
File sourceFile = new File(DocumentManager.storagePath(fileName, null));
sourceFile.delete();
fileName = correctName;
@ -472,7 +482,7 @@ public class IndexServlet extends HttpServlet {
final HttpServletResponse response,
final PrintWriter writer) {
try {
if (DocumentManager.tokenEnabled()) {
if (DocumentManager.tokenEnabled() && DocumentManager.tokenUseForRequest()) {
String documentJwtHeader = ConfigManager.getProperty("files.docservice.header");
@ -517,7 +527,8 @@ public class IndexServlet extends HttpServlet {
String userAddress = request.getParameter("userAddress");
String isEmbedded = request.getParameter("dmode");
if (DocumentManager.tokenEnabled() && isEmbedded == null && userAddress != null) {
if (DocumentManager.tokenEnabled() && isEmbedded == null && userAddress != null
&& DocumentManager.tokenUseForRequest()) {
String documentJwtHeader = ConfigManager.getProperty("files.docservice.header");
@ -633,6 +644,89 @@ public class IndexServlet extends HttpServlet {
}
}
// reference data
private static void reference(final HttpServletRequest request,
final HttpServletResponse response,
final PrintWriter writer) {
try {
Scanner scanner = new Scanner(request.getInputStream());
scanner.useDelimiter("\\A");
String bodyString = scanner.hasNext() ? scanner.next() : "";
scanner.close();
String fileKeyValue = "";
String userAddress = "";
String fileName = "";
boolean incorrectFileKey = false;
JSONParser parser = new JSONParser();
Gson gson = new GsonBuilder().disableHtmlEscaping().create();
JSONObject body = (JSONObject) parser.parse(bodyString);
if (body.containsKey("referenceData")) {
JSONObject referenceDataObj = (JSONObject) body.get("referenceData");
String instanceId = (String) referenceDataObj.get("instanceId");
if (instanceId.equals(DocumentManager.getServerUrl(false))) {
try {
JSONObject fileKey = (JSONObject) parser.parse((String) referenceDataObj.get("fileKey"));
userAddress = (String) fileKey.get("userAddress");
if (userAddress.equals(DocumentManager.curUserHostAddress(null))) {
fileName = (String) fileKey.get("fileName");
}
} catch (Exception e) {
incorrectFileKey = true; //data from DocEditor can give incorrect fileKey param in java Example
}
}
}
if (fileName.equals("")) {
try {
String path = (String) body.get("path");
path = FileUtility.getFileName(path);
File f = new File(DocumentManager.storagePath(path, null));
if (f.exists()) {
fileName = path;
}
} catch (Exception e) {
e.printStackTrace();
writer.write("{ \"error\" : 1, \"message\" : \"" + e.getMessage() + "\"}");
}
}
if (fileName.equals("")) {
writer.write("{ \"error\": \"File not found\"}");
return;
}
boolean directUrl = (boolean) body.get("directUrl");
HashMap<String, Object> fileKey = new HashMap<>();
fileKey.put("fileName", fileName);
fileKey.put("userAddress", DocumentManager.curUserHostAddress(null));
HashMap<String, Object> referenceData = new HashMap<>();
referenceData.put("instanceId", DocumentManager.getServerUrl(false));
referenceData.put("fileKey", gson.toJson(fileKey));
HashMap<String, Object> data = new HashMap<>();
data.put("fileType", FileUtility.getFileExtension(fileName).replace(".", ""));
data.put("url", DocumentManager.getDownloadUrl(fileName, true));
data.put("directUrl", directUrl ? DocumentManager.getDownloadUrl(fileName, false) : null);
data.put("referenceData", referenceData);
data.put("path", fileName);
if (DocumentManager.tokenEnabled()) {
String token = DocumentManager.createToken(data);
data.put("token", token);
}
writer.write(gson.toJson(data));
} catch (Exception e) {
e.printStackTrace();
writer.write("{ \"error\" : 1, \"message\" : \"" + e.getMessage() + "\"}");
}
}
// process get request
@Override

View File

@ -21,6 +21,18 @@ package entities;
import java.util.List;
public class CommentGroups {
public List<String> getView() {
return view;
}
public List<String> getEdit() {
return edit;
}
public List<String> getRemove() {
return remove;
}
private List<String> view;
private List<String> edit;
private List<String> remove;

View File

@ -77,6 +77,7 @@ public class FileModel {
.lastModified())));
document.setInfo(new Info());
document.getInfo().setFavorite(user.getFavorite());
document.setReferenceData(new ReferenceData(fileName, DocumentManager.curUserHostAddress(null), user));
String templatesImageUrl = DocumentManager.getTemplateImageUrl(FileUtility.getFileType(fileName));
List<Map<String, String>> templates = new ArrayList<>();
@ -123,6 +124,26 @@ public class FileModel {
changeType(mode, type, user, fileName);
}
public String getType() {
return type;
}
public String getMode() {
return mode;
}
public Document getDocument() {
return document;
}
public EditorConfig getEditorConfig() {
return editorConfig;
}
public String getToken() {
return token;
}
// change the document type
public void changeType(final String modeParam, final String typeParam, final User user, final String fileName) {
if (modeParam != null) {
@ -302,6 +323,7 @@ public class FileModel {
private String key;
private Info info;
private Permissions permissions;
private ReferenceData referenceData;
public String getTitle() {
return title;
@ -327,6 +349,10 @@ public class FileModel {
this.directUrl = directUrlParam;
}
public String getFileType() {
return fileType;
}
public void setFileType(final String fileTypeParam) {
this.fileType = fileTypeParam;
}
@ -354,6 +380,13 @@ public class FileModel {
public void setPermissions(final Permissions permissionsParam) {
this.permissions = permissionsParam;
}
public ReferenceData getReferenceData() {
return referenceData;
}
public void setReferenceData(final ReferenceData referenceDataParam) {
this.referenceData = referenceDataParam;
}
}
// the permissions parameters
@ -371,6 +404,7 @@ public class FileModel {
private final List<String> reviewGroups;
private final CommentGroups commentGroups;
private final List<String> userInfoGroups;
private final Boolean protect;
//public Gson gson = new Gson();
// defines what can be done with a document
@ -391,23 +425,115 @@ public class FileModel {
reviewGroups = user.getReviewGroups();
commentGroups = user.getCommentGroups();
userInfoGroups = user.getUserInfoGroups();
protect = !user.getDeniedPermissions().contains("protect");
}
public Boolean getComment() {
return comment;
}
public Boolean getCopy() {
return copy;
}
public Boolean getDownload() {
return download;
}
public Boolean getEdit() {
return edit;
}
public Boolean getPrint() {
return print;
}
public Boolean getFillForms() {
return fillForms;
}
public Boolean getModifyFilter() {
return modifyFilter;
}
public Boolean getModifyContentControl() {
return modifyContentControl;
}
public Boolean getReview() {
return review;
}
public Boolean getChat() {
return chat;
}
public List<String> getReviewGroups() {
return reviewGroups;
}
public CommentGroups getCommentGroups() {
return commentGroups;
}
public List<String> getUserInfoGroups() {
return userInfoGroups;
}
public Boolean getProtect() {
return protect;
}
}
public class ReferenceData {
private final String instanceId;
private final Map<String, String> fileKey;
public ReferenceData(final String fileName, final String curUserHostAddress, final User user) {
instanceId = DocumentManager.getServerUrl(true);
Map<String, String> fileKeyList = new HashMap<>();
if (!user.getId().equals("uid-0")) {
fileKeyList.put("fileName", fileName);
fileKeyList.put("userAddress", curUserHostAddress);
} else {
fileKeyList = null;
}
fileKey = fileKeyList;
}
public String getInstanceId() {
return instanceId;
}
public Map<String, String> getFileKey() {
return fileKey;
}
}
// the Favorite icon state
public class Info {
private String owner = "Me";
private Boolean favorite;
private String uploaded = getDate();
private String getDate() {
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("EEE MMM dd yyyy", Locale.US);
return simpleDateFormat.format(new Date());
public String getOwner() {
return owner;
}
public Boolean getFavorite() {
return favorite;
}
public void setFavorite(final Boolean favoriteParam) {
this.favorite = favoriteParam;
}
public String getUploaded() {
return uploaded;
}
private String getDate() {
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("EEE MMM dd yyyy", Locale.US);
return simpleDateFormat.format(new Date());
}
}
// the editor config parameters
public class EditorConfig {
@ -432,6 +558,34 @@ public class FileModel {
customization = new Customization();
}
public HashMap<String, Object> getActionLink() {
return actionLink;
}
public String getCallbackUrl() {
return callbackUrl;
}
public HashMap<String, Object> getCoEditing() {
return coEditing;
}
public String getLang() {
return lang;
}
public String getCreateUrl() {
return createUrl;
}
public List<Map<String, String>> getTemplates() {
return templates;
}
public Embedded getEmbedded() {
return embedded;
}
// set parameters for the embedded document
public void initDesktop(final String url) {
embedded = new Embedded();
@ -529,10 +683,6 @@ public class FileModel {
private Boolean comments;
private Boolean feedback;
public Goback getGoback() {
return goback;
}
public void setSubmitForm(final Boolean submitFormParam) {
this.submitForm = submitFormParam;
}
@ -545,6 +695,30 @@ public class FileModel {
goback = new Goback();
}
public Goback getGoback() {
return goback;
}
public Boolean getForcesave() {
return forcesave;
}
public Boolean getSubmitForm() {
return submitForm;
}
public Boolean getAbout() {
return about;
}
public Boolean getComments() {
return comments;
}
public Boolean getFeedback() {
return feedback;
}
public class Goback {
private String url;
@ -565,18 +739,34 @@ public class FileModel {
private String shareUrl;
private String toolbarDocked;
public String getSaveUrl() {
return saveUrl;
}
public void setSaveUrl(final String saveUrlParam) {
this.saveUrl = saveUrlParam;
}
public String getEmbedUrl() {
return embedUrl;
}
public void setEmbedUrl(final String embedUrlParam) {
this.embedUrl = embedUrlParam;
}
public String getShareUrl() {
return shareUrl;
}
public void setShareUrl(final String shareUrlParam) {
this.shareUrl = shareUrlParam;
}
public String getToolbarDocked() {
return toolbarDocked;
}
public void setToolbarDocked(final String toolbarDockedParam) {
this.toolbarDocked = toolbarDockedParam;
}

View File

@ -565,11 +565,22 @@ public final class DocumentManager {
return secret != null && !secret.isEmpty();
}
// check if the token is enabled for request
public static Boolean tokenUseForRequest() {
String tokenUseForRequest = getTokenUseForRequest();
return Boolean.parseBoolean(tokenUseForRequest) && !tokenUseForRequest.isEmpty();
}
// get token secret from the config parameters
public static String getTokenSecret() {
return ConfigManager.getProperty("files.docservice.secret");
}
// get config request jwt
public static String getTokenUseForRequest() {
return ConfigManager.getProperty("files.docservice.token-use-for-request");
}
// get languages
public static Map<String, String> getLanguages() {
String langs = ConfigManager.getProperty("files.docservice.languages");

View File

@ -137,10 +137,10 @@ public final class ServiceConverter {
}
// get the url of the converted file
public static String getConvertedUri(final String documentUri, final String fromExtension,
final String toExtension, final String documentRevisionId,
final String filePass, final Boolean isAsync,
final String lang) throws Exception {
public static Map<String, String> getConvertedData(final String documentUri, final String fromExtension,
final String toExtension, final String documentRevisionId,
final String filePass, final Boolean isAsync,
final String lang) throws Exception {
// check if the fromExtension parameter is defined; if not, get it from the document url
String fromExt = fromExtension == null || fromExtension.isEmpty()
? FileUtility.getFileExtension(documentUri) : fromExtension;
@ -168,7 +168,7 @@ public final class ServiceConverter {
}
String headerToken = "";
if (DocumentManager.tokenEnabled()) {
if (DocumentManager.tokenEnabled() && DocumentManager.tokenUseForRequest()) {
HashMap<String, Object> map = new HashMap<String, Object>();
map.put("region", lang);
map.put("url", body.getUrl());
@ -213,14 +213,15 @@ public final class ServiceConverter {
connection.connect();
try (OutputStream os = connection.getOutputStream()) {
os.write(bodyByte);
}
int statusCode = connection.getResponseCode();
if (statusCode != HttpServletResponse.SC_OK) { // checking status code
connection.disconnect();
throw new Exception("Conversion service returned status: " + statusCode);
}
try (OutputStream os = connection.getOutputStream()) {
os.write(bodyByte);
}
InputStream stream = connection.getInputStream();
@ -233,7 +234,7 @@ public final class ServiceConverter {
connection.disconnect();
return getResponseUri(jsonString);
return getResponseData(jsonString);
}
// generate document key
@ -254,8 +255,8 @@ public final class ServiceConverter {
throw new Exception(errorMessage);
}
// get the response url
private static String getResponseUri(final String jsonString) throws Exception {
// get the response data
private static Map<String, String> getResponseData(final String jsonString) throws Exception {
JSONObject jsonObj = convertStringToJSON(jsonString);
Object error = jsonObj.get("error");
@ -268,17 +269,23 @@ public final class ServiceConverter {
Long resultPercent = 0L;
String responseUri = null;
String responseFileType = null;
Map<String, String> responseData = new HashMap<>();
if (isEndConvert) { // if the conversion is completed
resultPercent = FULL_LOADING_IN_PERCENT;
responseUri = (String) jsonObj.get("fileUrl"); // get the file url
responseFileType = (String) jsonObj.get("fileType"); // get the file type
responseData.put("fileUrl", responseUri);
responseData.put("fileType", responseFileType);
} else { // if the conversion isn't completed
resultPercent = (Long) jsonObj.get("percent");
responseData.put("fileUrl", "");
resultPercent = resultPercent >= FULL_LOADING_IN_PERCENT
? FULL_LOADING_IN_PERCENT - 1 : resultPercent; // get the percentage value
}
return resultPercent >= FULL_LOADING_IN_PERCENT ? responseUri : "";
return responseData;
}
// convert stream to string

View File

@ -87,7 +87,7 @@ public final class TrackManager {
}
// if the secret key to generate token exists
if (DocumentManager.tokenEnabled()) {
if (DocumentManager.tokenEnabled() && DocumentManager.tokenUseForRequest()) {
String token = (String) body.get("token"); // get the document token
if (token == null) { // if JSON web token is not received
@ -156,9 +156,9 @@ public final class TrackManager {
if (!curExt.equals(downloadExt)) {
try {
String newFileUri = ServiceConverter
.getConvertedUri(downloadUri, downloadExt, curExt,
.getConvertedData(downloadUri, downloadExt, curExt,
ServiceConverter.generateRevisionId(downloadUri),
null, false, null); // convert file and get url to a new file
null, false, null).get("fileUrl"); // convert file and get url to a new file
if (newFileUri.isEmpty()) {
// get the correct file name if it already exists
@ -244,9 +244,9 @@ public final class TrackManager {
if (!curExt.equals(downloadExt)) {
try {
String newFileUri = ServiceConverter
.getConvertedUri(downloadUri, downloadExt, curExt,
.getConvertedData(downloadUri, downloadExt, curExt,
ServiceConverter.generateRevisionId(downloadUri), null,
false, null); // convert file and get url to a new file
false, null).get("fileUrl"); // convert file and get url to a new file
if (newFileUri.isEmpty()) {
newFileName = true;
} else {
@ -388,7 +388,8 @@ public final class TrackManager {
}
String headerToken = "";
if (DocumentManager.tokenEnabled()) { // check if a secret key to generate token exists or not
// check if a secret key to generate token exists or not
if (DocumentManager.tokenEnabled() && DocumentManager.tokenUseForRequest()) {
Map<String, Object> payloadMap = new HashMap<String, Object>();
payloadMap.put("payload", params);
headerToken = DocumentManager.createToken(payloadMap); // encode a payload object into a header token

View File

@ -72,6 +72,7 @@ public final class Users {
add("Cant see anyones information");
add("Can't rename files from the editor");
add("Can't view chat");
add("Can't protect file");
add("View file without collaboration");
}};
@ -85,12 +86,12 @@ public final class Users {
true, new ArrayList<String>(), descriptionUserSecond, 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>()), Arrays.asList("group-2"),
Arrays.asList("group-2"), null), Arrays.asList("group-2"),
false, Arrays.asList("copy", "download", "print"),
descriptionUserThird, false));
add(new User("uid-0", null, null,
"", null, new CommentGroups(), new ArrayList<String>(),
null, new ArrayList<String>(), descriptionUserZero, false));
"", null, null, null,
null, Arrays.asList("protect"), descriptionUserZero, false));
}};
private Users() { }

View File

@ -1,12 +1,12 @@
version=1.5.0
version=1.6.0
filesize-max=5242880
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|.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.fill-docs=.docx|.oform
files.docservice.viewed-docs=.djvu|.oxps|.pdf|.xps
files.docservice.edited-docs=.csv|.docm|.docx|.docxf|.dotm|.dotx|.epub|.fb2|.html|.odp|.ods|.odt|.otp|.ots|.ott|.potm|.potx|.ppsm|.ppsx|.pptm|.pptx|.rtf|.txt|.xlsm|.xlsx|.xltm|.xltx
files.docservice.convert-docs=.doc|.dot|.dps|.dpt|.epub|.et|.ett|.fb2|.fodp|.fods|.fodt|.htm|.html|.mht|.mhtml|.odp|.ods|.odt|.otp|.ots|.ott|.pot|.pps|.ppt|.rtf|.stw|.sxc|.sxi|.sxw|.wps|.wpt|.xls|.xlsb|.xlt|.xml
files.docservice.timeout=120000
files.docservice.url.site=http://documentserver/
@ -16,9 +16,10 @@ files.docservice.url.api=web-apps/apps/api/documents/api.js
files.docservice.url.preloader=web-apps/apps/api/documents/cache-scripts.html
files.docservice.url.example=
files.docservice.languages=en:English|hy:Armenian|az:Azerbaijani|eu:Basque|be:Belarusian|bg:Bulgarian|ca:Catalan|zh:Chinese (People's Republic of China)|zh-TW:Chinese (Traditional, Taiwan)|cs:Czech|da:Danish|nl:Dutch|fi:Finnish|fr:French|gl:Galego|de:German|el:Greek|hu:Hungarian|id:Indonesian|it:Italian|ja:Japanese|ko:Korean|lv:Latvian|lo:Lao|ms:Malay (Malaysia)|nb:Norwegian|pl:Polish|pt:Portuguese (Brazil)|pt-PT:Portuguese (Portugal)|ro:Romanian|ru:Russian|sk:Slovak|sl:Slovenian|es:Spanish|sv:Swedish|tr:Turkish|uk:Ukrainian|vi:Vietnamese|aa-AA:Test Language
files.docservice.languages=en:English|hy:Armenian|az:Azerbaijani|eu:Basque|be:Belarusian|bg:Bulgarian|ca:Catalan|zh:Chinese (Simplified)|zh-TW:Chinese (Traditional)|cs:Czech|da:Danish|nl:Dutch|fi:Finnish|fr:French|gl:Galego|de:German|el:Greek|hu:Hungarian|id:Indonesian|it:Italian|ja:Japanese|ko:Korean|lo:Lao|lv:Latvian|ms:Malay (Malaysia)|no:Norwegian|pl:Polish|pt:Portuguese (Brazil)|pt-PT:Portuguese (Portugal)|ro:Romanian|ru:Russian|si:Sinhala (Sri Lanka)|sk:Slovak|sl:Slovenian|es:Spanish|sv:Swedish|tr:Turkish|uk:Ukrainian|vi:Vietnamese|aa-AA:Test Language
files.docservice.secret=
files.docservice.header=Authorization
files.docservice.token-use-for-request=TRUE
files.docservice.verify-peer-off=TRUE

View File

@ -668,3 +668,8 @@
max-width:15%;
}
}
@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
.tableRow td:first-child{
max-width: none;
}
}

Some files were not shown because too many files have changed in this diff Show More