stable

Clone or download

Read-only

refactor: do not store anymore settings in forgeconfig

No functional changes. Now server settings are stored in the dedicated table. For now we take the first available server for communication between Tuleap and OO document server, but a next contribution will tie a download/save token to a server so that we know which JWT secret key we can use to ensure authenticity of the JWT. Part of story #29981: restrict an OnlyOffice server to some projects only Change-Id: I06bb96a231fc43915d7427c0532beba1e6db1272

Modified Files

Name
M plugins/onlyoffice/db/install.sql +6 −0 Go to diff View file
A plugins/onlyoffice/db/mysql/2022/202212140933_add_document_server_table.php +62 −0 Go to diff View file
M plugins/onlyoffice/db/uninstall.sql +1 −0 Go to diff View file
M plugins/onlyoffice/include/Administration/OnlyOfficeAdminSettingsPresenter.php +2 −0 Go to diff View file
A plugins/onlyoffice/include/Administration/OnlyOfficeAdminSettingsPresenterBuilder.php +47 −0 Go to diff View file
M plugins/onlyoffice/include/Administration/OnlyOfficeAvailabilityChecker.php +10 −10 Go to diff View file
A plugins/onlyoffice/include/Administration/OnlyOfficeCreateAdminSettingsController.php +80 −0 Go to diff View file
M plugins/onlyoffice/include/Administration/OnlyOfficeDeleteAdminSettingsController.php +4 −4 Go to diff View file
M plugins/onlyoffice/include/Administration/OnlyOfficeServerPresenter.php +14 −1 Go to diff View file
R plugins/onlyoffice/include/Administration/OnlyOfficeSaveAdminSettingsController.php Go to diff View file
A plugins/onlyoffice/include/DocumentServer/DocumentServer.php +38 −0 Go to diff View file
A plugins/onlyoffice/include/DocumentServer/DocumentServerDao.php +67 −0 Go to diff View file
A plugins/onlyoffice/include/DocumentServer/DocumentServerKeyEncryption.php +51 −0 Go to diff View file
R plugins/onlyoffice/include/Administration/OnlyOfficeDocumentServerSettings.php Go to diff View file
A plugins/onlyoffice/include/DocumentServer/IDeleteDocumentServer.php +28 −0 Go to diff View file
A plugins/onlyoffice/include/DocumentServer/IRetrieveDocumentServers.php +31 −0 Go to diff View file
A plugins/onlyoffice/include/DocumentServer/IUpdateDocumentServer.php +30 −0 Go to diff View file
M plugins/onlyoffice/include/Open/DocmanFileLastVersionToOnlyOfficeDocumentTransformer.php +11 −1 Go to diff View file
M plugins/onlyoffice/include/Open/Editor/OnlyOfficeGlobalEditorJWTokenProvider.php +3 −2 Go to diff View file
M plugins/onlyoffice/include/Open/OnlyOfficeDocument.php +3 −0 Go to diff View file
M plugins/onlyoffice/include/Open/OnlyOfficeEditorController.php +9 −3 Go to diff View file
M plugins/onlyoffice/include/Save/OnlyOfficeCallbackResponseJWTParser.php +14 −2 Go to diff View file
M plugins/onlyoffice/include/onlyofficePlugin.php +50 −27 Go to diff View file
M plugins/onlyoffice/site-content/fr_FR/LC_MESSAGES/tuleap-onlyoffice.po +3 −0 Go to diff View file
M plugins/onlyoffice/site-content/pr_BR/LC_MESSAGES/tuleap-onlyoffice.po +3 −0 Go to diff View file
M plugins/onlyoffice/templates/site-admin.mustache +4 −2 Go to diff View file
A plugins/onlyoffice/tests/integration/DocumentServer/DocumentServerDaoTest.php +88 −0 Go to diff View file
M plugins/onlyoffice/tests/unit/Administration/OnlyOfficeAdminSettingsControllerTest.php +3 −1 Go to diff View file
A plugins/onlyoffice/tests/unit/Administration/OnlyOfficeAdminSettingsPresenterBuilderTest.php +49 −0 Go to diff View file
M plugins/onlyoffice/tests/unit/Administration/OnlyOfficeAvailabilityCheckerTest.php +10 −13 Go to diff View file
R plugins/onlyoffice/tests/unit/Administration/OnlyOfficeSaveAdminSettingsControllerTest.php Go to diff View file
M plugins/onlyoffice/tests/unit/Administration/OnlyOfficeDeleteAdminSettingsControllerTest.php +7 −7 Go to diff View file
A plugins/onlyoffice/tests/unit/Administration/OnlyOfficeUpdateAdminSettingsControllerTest.php +100 −0 Go to diff View file
M plugins/onlyoffice/tests/unit/Download/OnlyOfficeDownloadDocumentTokenGeneratorDBStoreTest.php +10 −1 Go to diff View file
M plugins/onlyoffice/tests/unit/Open/DocmanFileLastVersionToOnlyOfficeDocumentTransformerTest.php +5 −1 Go to diff View file
M plugins/onlyoffice/tests/unit/Open/Editor/OnlyOfficeDocumentConfigProviderTest.php +2 −0 Go to diff View file
M plugins/onlyoffice/tests/unit/Open/Editor/OnlyOfficeGlobalEditorJWTokenProviderTest.php +22 −7 Go to diff View file
M plugins/onlyoffice/tests/unit/Open/ProvideOnlyOfficeDocumentStub.php +14 −1 Go to diff View file
M plugins/onlyoffice/tests/unit/Open/TransformDocmanFileLastVersionToOnlyOfficeDocumentStub.php +20 −3 Go to diff View file
M plugins/onlyoffice/tests/unit/Save/OnlyOfficeCallbackResponseJWTParserTest.php +19 −10 Go to diff View file
M plugins/onlyoffice/tests/unit/Save/OnlyOfficeSaveCallbackURLGeneratorTest.php +3 −1 Go to diff View file
M plugins/onlyoffice/tests/unit/Save/OnlyOfficeSaveDocumentTokenGeneratorDBStoreTest.php +22 −3 Go to diff View file
A plugins/onlyoffice/tests/unit/Stubs/ICreateDocumentServerStub.php +50 −0 Go to diff View file
A plugins/onlyoffice/tests/unit/Stubs/IDeleteDocumentServerStub.php +49 −0 Go to diff View file
A plugins/onlyoffice/tests/unit/Stubs/IRetrieveDocumentServersStub.php +54 −0 Go to diff View file
A plugins/onlyoffice/tests/unit/Stubs/IUpdateDocumentServerStub.php +50 −0 Go to diff View file
M src/common/include/CSRFSynchronizerTokenPresenter.php +3 −1 Go to diff View file