Skip to content

Commit

Permalink
Merge pull request #542 from ONLYOFFICE/develop
Browse files Browse the repository at this point in the history
Release/7.2.0
  • Loading branch information
LinneyS authored Nov 2, 2021
2 parents d7cdf80 + 9c3b677 commit 212be8a
Show file tree
Hide file tree
Showing 47 changed files with 1,673 additions and 759 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# Change Log

## 7.2.0
## Added
- set favicon on editor page
- versions restore from editor

## Changed
- fixed privacy rules for get users when mention
- document server v6.0 and earlier is no longer supported
- editing by link only for available groups
- open share link directly

## 7.1.2
## Changed
- fix editing from mobile app
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ ONLYOFFICE Document Server and Nextcloud can be installed either on different co

You can install free Community version of ONLYOFFICE Docs or scalable Enterprise Edition with pro features.

To install free Community version, use [Docker](https://github.com/onlyoffice/Docker-DocumentServer) (recommended) or follow [these instructions](https://helpcenter.onlyoffice.com/server/linux/document/linux-installation.aspx) for Debian, Ubuntu, or derivatives.
To install free Community version, use [Docker](https://github.com/onlyoffice/Docker-DocumentServer) (recommended) or follow [these instructions](https://helpcenter.onlyoffice.com/installation/docs-community-install-ubuntu.aspx) for Debian, Ubuntu, or derivatives.

To install Enterprise Edition, follow instructions [here](https://helpcenter.onlyoffice.com/server/integration-edition/index.aspx).
To install Enterprise Edition, follow instructions [here](https://helpcenter.onlyoffice.com/installation/docs-enterprise-index.aspx).

Community Edition vs Enterprise Edition comparison can be found [here](#onlyoffice-docs-editions).

To use ONLYOFFICE behind a proxy, please refer to [this article](https://helpcenter.onlyoffice.com/server/document/document-server-proxy.aspx).
To use ONLYOFFICE behind a proxy, please refer to [this article](https://helpcenter.onlyoffice.com/installation/docs-community-proxy.aspx).

You can also use our **[Docker installation](https://github.com/ONLYOFFICE/docker-onlyoffice-nextcloud)** to install pre-configured Document Server (free version) and Nextcloud with a couple of commands.

Expand Down Expand Up @@ -164,7 +164,7 @@ The table below will help you to make the right choice.

| Pricing and licensing | Community Edition | Enterprise Edition |
| ------------- | ------------- | ------------- |
| | [Get it now](https://www.onlyoffice.com/download.aspx?utm_source=github&utm_medium=cpc&utm_campaign=GitHubNextcloud) | [Start Free Trial](https://www.onlyoffice.com/enterprise-edition-free.aspx?utm_source=github&utm_medium=cpc&utm_campaign=GitHubNextcloud) |
| | [Get it now](https://www.onlyoffice.com/download-docs.aspx?utm_source=github&utm_medium=cpc&utm_campaign=GitHubNextcloud#docs-community) | [Start Free Trial](https://www.onlyoffice.com/download-docs.aspx?utm_source=github&utm_medium=cpc&utm_campaign=GitHubNextcloud#docs-enterprise) |
| Cost | FREE | [Go to the pricing page](https://www.onlyoffice.com/docs-enterprise-prices.aspx?utm_source=github&utm_medium=cpc&utm_campaign=GitHubNextcloud) |
| Simultaneous connections | up to 20 maximum | As in chosen pricing plan |
| Number of users | up to 20 recommended | As in chosen pricing plan |
Expand Down Expand Up @@ -218,7 +218,7 @@ The table below will help you to make the right choice.
| Transitions | + | + |
| Presenter mode | + | + |
| Notes | + | + |
| | [Get it now](https://www.onlyoffice.com/download.aspx?utm_source=github&utm_medium=cpc&utm_campaign=GitHubNextcloud) | [Start Free Trial](https://www.onlyoffice.com/enterprise-edition-free.aspx?utm_source=github&utm_medium=cpc&utm_campaign=GitHubNextcloud) |
| | [Get it now](https://www.onlyoffice.com/download-docs.aspx?utm_source=github&utm_medium=cpc&utm_campaign=GitHubNextcloud#docs-community) | [Start Free Trial](https://www.onlyoffice.com/download-docs.aspx?utm_source=github&utm_medium=cpc&utm_campaign=GitHubNextcloud#docs-enterprise) |

\* It's possible to add documents for comparison from your local drive, from URL and from Nextcloud storage.

Expand Down
102 changes: 32 additions & 70 deletions appinfo/application.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,25 +25,31 @@
use OCP\AppFramework\Bootstrap\IBootContext;
use OCP\AppFramework\Bootstrap\IBootstrap;
use OCP\AppFramework\Bootstrap\IRegistrationContext;
use OCP\AppFramework\Http\ContentSecurityPolicy;
use OCP\Dashboard\RegisterWidgetEvent;
use OCP\DirectEditing\RegisterDirectEditorEvent;
use OCP\Files\Template\FileCreatedFromTemplateEvent;
use OCP\Files\Template\ITemplateManager;
use OCP\Files\Template\TemplateFileCreator;
use OCA\Files\Event\LoadAdditionalScriptsEvent;
use OCP\IL10N;
use OCP\IPreview;
use OCP\ITagManager;
use OCP\Notification\IManager;
use OCP\Util;

use OCA\Files_Sharing\Event\BeforeTemplateRenderedEvent;
use OCA\Viewer\Event\LoadViewer;

use OCA\Onlyoffice\AppConfig;
use OCA\Onlyoffice\Controller\CallbackController;
use OCA\Onlyoffice\Controller\EditorController;
use OCA\Onlyoffice\Controller\EditorApiController;
use OCA\Onlyoffice\Controller\SettingsController;
use OCA\Onlyoffice\Controller\TemplateController;
use OCA\Onlyoffice\Listeners\FilesListener;
use OCA\Onlyoffice\Listeners\FileSharingListener;
use OCA\Onlyoffice\Listeners\DirectEditorListener;
use OCA\Onlyoffice\Listeners\ViewerListener;
use OCA\Onlyoffice\Listeners\WidgetListener;
use OCA\Onlyoffice\Crypt;
use OCA\Onlyoffice\DirectEditor;
use OCA\Onlyoffice\Hooks;
Expand Down Expand Up @@ -135,6 +141,24 @@ public function register(IRegistrationContext $context): void {

$context->registerService("EditorController", function (ContainerInterface $c) {
return new EditorController(
$c->get("AppName"),
$c->get("Request"),
$c->get("RootStorage"),
$c->get("UserSession"),
$c->get("UserManager"),
$c->get("URLGenerator"),
$c->get("L10N"),
$c->get("Logger"),
$this->appConfig,
$this->crypt,
$c->get("IManager"),
$c->get("Session"),
$c->get("GroupManager")
);
});

$context->registerService("EditorApiController", function (ContainerInterface $c) {
return new EditorApiController(
$c->get("AppName"),
$c->get("Request"),
$c->get("RootStorage"),
Expand Down Expand Up @@ -176,6 +200,12 @@ public function register(IRegistrationContext $context): void {
);
});

$context->registerEventListener(LoadAdditionalScriptsEvent::class, FilesListener::class);
$context->registerEventListener(RegisterDirectEditorEvent::class, DirectEditorListener::class);
$context->registerEventListener(LoadViewer::class, ViewerListener::class);
$context->registerEventListener(BeforeTemplateRenderedEvent::class, FileSharingListener::class);
$context->registerEventListener(RegisterWidgetEvent::class, WidgetListener::class);

if (interface_exists("OCP\Files\Template\ICustomTemplateProvider")) {
$context->registerTemplateProvider(TemplateProvider::class);
}
Expand All @@ -186,65 +216,6 @@ public function boot(IBootContext $context): void {

$context->injectFn(function (SymfonyAdapter $eventDispatcher) {

$eventDispatcher->addListener('OCA\Files::loadAdditionalScripts',
function() {
if (!empty($this->appConfig->GetDocumentServerUrl())
&& $this->appConfig->SettingsAreSuccessful()
&& $this->appConfig->isUserAllowedToUse()) {

Util::addScript("onlyoffice", "desktop");
Util::addScript("onlyoffice", "main");
Util::addScript("onlyoffice", "template");

if ($this->appConfig->GetSameTab()) {
Util::addScript("onlyoffice", "listener");
}

Util::addStyle("onlyoffice", "main");
Util::addStyle("onlyoffice", "template");
}
});

$eventDispatcher->addListener(LoadViewer::class,
function () {
if (!empty($this->appConfig->GetDocumentServerUrl())
&& $this->appConfig->SettingsAreSuccessful()
&& $this->appConfig->isUserAllowedToUse()) {
Util::addScript("onlyoffice", "viewer");
Util::addScript("onlyoffice", "listener");

Util::addStyle("onlyoffice", "viewer");

$csp = new ContentSecurityPolicy();
$csp->addAllowedFrameDomain("'self'");
$cspManager = $this->getContainer()->getServer()->getContentSecurityPolicyManager();
$cspManager->addDefaultPolicy($csp);
}
});

$eventDispatcher->addListener('OCA\Files_Sharing::loadAdditionalScripts',
function() {
if (!empty($this->appConfig->GetDocumentServerUrl())
&& $this->appConfig->SettingsAreSuccessful()) {
Util::addScript("onlyoffice", "main");

if ($this->appConfig->GetSameTab()) {
Util::addScript("onlyoffice", "listener");
}

Util::addStyle("onlyoffice", "main");
}
});

$eventDispatcher->addListener(RegisterWidgetEvent::class,
function () {
if (!empty($this->appConfig->GetDocumentServerUrl())
&& $this->appConfig->SettingsAreSuccessful()
&& $this->appConfig->isUserAllowedToUse()) {
Util::addScript("onlyoffice", "desktop");
}
});

$container = $this->getContainer();

if (class_exists("OCP\Files\Template\FileCreatedFromTemplateEvent")) {
Expand All @@ -266,15 +237,6 @@ function (FileCreatedFromTemplateEvent $event) {
return $container->query(Preview::class);
});

$eventDispatcher->addListener(RegisterDirectEditorEvent::class,
function (RegisterDirectEditorEvent $event) use ($container) {
if (!empty($this->appConfig->GetDocumentServerUrl())
&& $this->appConfig->SettingsAreSuccessful()) {
$editor = $container->query(DirectEditor::class);
$event->register($editor);
}
});

});

$context->injectFn(function (IManager $notificationsManager) {
Expand Down
4 changes: 2 additions & 2 deletions appinfo/info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
<description>ONLYOFFICE connector allows you to view, edit and collaborate on text documents, spreadsheets and presentations within Nextcloud using ONLYOFFICE Docs. This will create a new Edit in ONLYOFFICE action within the document library for Office documents. This allows multiple users to co-author documents in real time from the familiar web interface and save the changes back to your file storage.</description>
<licence>apache</licence>
<author mail="[email protected]" homepage="https://www.onlyoffice.com/">Ascensio System SIA</author>
<version>7.1.2</version>
<version>7.2.0</version>
<namespace>Onlyoffice</namespace>
<types>
<filesystem/>
<prevent_group_restriction/>
</types>
<documentation>
<admin>https://api.onlyoffice.com/editors/nextcloud</admin>
Expand Down
5 changes: 3 additions & 2 deletions appinfo/routes.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@
["name" => "editor#public_page", "url" => "/s/{shareToken}", "verb" => "GET"],
["name" => "editor#users", "url" => "/ajax/users", "verb" => "GET"],
["name" => "editor#mention", "url" => "/ajax/mention", "verb" => "POST"],
["name" => "editor#config", "url" => "/ajax/config/{fileId}", "verb" => "GET"],
["name" => "editor#create", "url" => "/ajax/new", "verb" => "POST"],
["name" => "editor#convert", "url" => "/ajax/convert", "verb" => "POST"],
["name" => "editor#save", "url" => "/ajax/save", "verb" => "POST"],
["name" => "editor#url", "url" => "/ajax/url", "verb" => "GET"],
["name" => "editor#history", "url" => "/ajax/history", "verb" => "GET"],
["name" => "editor#version", "url" => "/ajax/version", "verb" => "GET"],
["name" => "editor#restore", "url" => "/ajax/restore", "verb" => "PUT"],
["name" => "settings#save_address", "url" => "/ajax/settings/address", "verb" => "PUT"],
["name" => "settings#save_common", "url" => "/ajax/settings/common", "verb" => "PUT"],
["name" => "settings#save_watermark", "url" => "/ajax/settings/watermark", "verb" => "PUT"],
Expand All @@ -47,6 +47,7 @@
],
"ocs" => [
["name" => "federation#key", "url" => "/api/v1/key", "verb" => "POST"],
["name" => "federation#keylock", "url" => "/api/v1/keylock", "verb" => "POST"]
["name" => "federation#keylock", "url" => "/api/v1/keylock", "verb" => "POST"],
["name" => "editorapi#config", "url" => "/api/v1/config/{fileId}", "verb" => "GET"]
]
];
Loading

0 comments on commit 212be8a

Please sign in to comment.