Skip to content

Commit

Permalink
Merge pull request #363 from ONLYOFFICE/develop
Browse files Browse the repository at this point in the history
Release/7.2.1
  • Loading branch information
LinneyS authored Nov 2, 2021
2 parents c6a0102 + 82edc41 commit d55fa87
Show file tree
Hide file tree
Showing 43 changed files with 676 additions and 190 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.1
## 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.1
## Added
- support ownCloud Web
Expand Down
18 changes: 10 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ ONLYOFFICE Document Server and ownCloud can be installed either on different com

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-owncloud)** to install pre-configured Document Server (free version) and ownCloud with a couple of commands.

Expand Down Expand Up @@ -123,11 +123,13 @@ To register the connector, use these lines:
"external_apps": [
{
"id": "onlyoffice",
"path": "http(s)://<owncloud-10-server-address>/custom/onlyoffice/js/web/onlyoffice.js",
"path": "http(s)://<owncloud-10-server-address>/index.php/apps/onlyoffice/js/onlyoffice.js",
}
]
```

Depending on your webserver configuration you can drop the `index.php` segment from the url path.

## How it works

The ONLYOFFICE integration follows the API documented [here](https://api.onlyoffice.com/editors/basic):
Expand Down Expand Up @@ -196,13 +198,13 @@ 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=GitHubOwncloud) | [Start Free Trial](https://www.onlyoffice.com/enterprise-edition-free.aspx?utm_source=github&utm_medium=cpc&utm_campaign=GitHubOwncloud) |
| Cost | FREE | [Go to the pricing page](https://www.onlyoffice.com/enterprise-edition.aspx??utm_source=github&utm_medium=cpc&utm_campaign=GitHubOwncloud) |
| | [Get it now](https://www.onlyoffice.com/download-docs.aspx?utm_source=github&utm_medium=cpc&utm_campaign=GitHubOwncloud#docs-community) | [Start Free Trial](https://www.onlyoffice.com/download-docs.aspx?utm_source=github&utm_medium=cpc&utm_campaign=GitHubOwncloud#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=GitHubOwncloud) |
| Simultaneous connections | up to 20 maximum | As in chosen pricing plan |
| Number of users | up to 20 recommended | As in chosen pricing plan |
| License | GNU AGPL v.3 | Proprietary |
| **Support** | **Community Edition** | **Enterprise Edition** |
| Documentation | [Help Center](https://helpcenter.onlyoffice.com/server/docker/opensource/index.aspx) | [Help Center](https://helpcenter.onlyoffice.com/server/integration-edition/index.aspx) |
| Documentation | [Help Center](https://helpcenter.onlyoffice.com/installation/docs-community-index.aspx) | [Help Center](https://helpcenter.onlyoffice.com/installation/docs-enterprise-index.aspx) |
| Standard support | [GitHub](https://github.com/ONLYOFFICE/DocumentServer/issues) or paid | One year support included |
| Premium support | [Buy Now](https://www.onlyoffice.com/support.aspx?utm_source=github&utm_medium=cpc&utm_campaign=GitHubOwncloud) | [Buy Now](https://www.onlyoffice.com/support.aspx?utm_source=github&utm_medium=cpc&utm_campaign=GitHubOwncloud) |
| **Services** | **Community Edition** | **Enterprise Edition** |
Expand Down Expand Up @@ -250,7 +252,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=GitHubOwncloud) | [Start Free Trial](https://www.onlyoffice.com/enterprise-edition-free.aspx?utm_source=github&utm_medium=cpc&utm_campaign=GitHubOwncloud) |
| | [Get it now](https://www.onlyoffice.com/download-docs.aspx?utm_source=github&utm_medium=cpc&utm_campaign=GitHubOwncloud#docs-community) | [Start Free Trial](https://www.onlyoffice.com/download-docs.aspx?utm_source=github&utm_medium=cpc&utm_campaign=GitHubOwncloud#docs-enterprise) |

\* It's possible to add documents for comparison from your local drive, from URL and from ownCloud storage.
Expand Down
13 changes: 12 additions & 1 deletion appinfo/application.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
use OCA\Onlyoffice\Controller\SettingsApiController;
use OCA\Onlyoffice\Controller\SettingsController;
use OCA\Onlyoffice\Controller\TemplateController;
use OCA\Onlyoffice\Controller\WebAssetController;
use OCA\Onlyoffice\Crypt;
use OCA\Onlyoffice\Hookhandler;
use OCA\Onlyoffice\Hooks;
Expand Down Expand Up @@ -170,13 +171,15 @@ function () {
$c->query("Request"),
$c->query("RootStorage"),
$c->query("UserSession"),
$c->query("ServerContainer")->getUserManager(),
$c->query("URLGenerator"),
$c->query("L10N"),
$c->query("Logger"),
$this->appConfig,
$this->crypt,
$c->query("IManager"),
$c->query("Session")
$c->query("Session"),
$c->query("ServerContainer")->getGroupManager()
);
});

Expand Down Expand Up @@ -221,6 +224,14 @@ function () {
);
});

$container->registerService("WebAssetController", function ($c) {
return new WebAssetController(
$c->query("AppName"),
$c->query("Request"),
$c->query("Logger")
);
});


Hooks::connectHooks();
}
Expand Down
2 changes: 1 addition & 1 deletion appinfo/info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<description>ONLYOFFICE connector allows you to view, edit and collaborate on text documents, spreadsheets and presentations within ownCloud 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>apl2</licence>
<author>Ascensio System SIA</author>
<version>7.1.1</version>
<version>7.2.1</version>
<namespace>Onlyoffice</namespace>
<types>
<filesystem/>
Expand Down
2 changes: 2 additions & 0 deletions appinfo/routes.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,15 @@
["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#get_settings", "url" => "/ajax/settings", "verb" => "GET"],
["name" => "settings#clear_history", "url" => "/ajax/settings/history", "verb" => "DELETE"],
["name" => "template#add_template", "url" => "/ajax/template", "verb" => "POST"],
["name" => "template#get_templates", "url" => "/ajax/template", "verb" => "GET"],
["name" => "template#delete_template", "url" => "/ajax/template", "verb" => "DELETE"],
["name" => "webasset#get", "url" => "/js/onlyoffice.js", "verb" => "GET"],
],
"ocs" => [
["name" => "federation#key", "url" => "/api/v1/key", "verb" => "POST"],
Expand Down
28 changes: 20 additions & 8 deletions controller/editorapicontroller.php
Original file line number Diff line number Diff line change
Expand Up @@ -242,10 +242,6 @@ public function fillempty($fileId) {
*/
public function config($fileId, $filePath = null, $shareToken = null, $version = 0, $inframe = false, $desktop = false, $template = false, $anchor = null) {

if (empty($shareToken) && !$this->config->isUserAllowedToUse()) {
return new JSONResponse(["error" => $this->trans->t("Not permitted")]);
}

$user = $this->userSession->getUser();
$userId = null;
if (!empty($user)) {
Expand All @@ -259,6 +255,14 @@ public function config($fileId, $filePath = null, $shareToken = null, $version =
return new JSONResponse(["error" => $error]);
}

$checkUserAllowGroups = $userId;
if (!empty($share)) {
$checkUserAllowGroups = $share->getSharedBy();
}
if (!$this->config->isUserAllowedToUse($checkUserAllowGroups)) {
return new JSONResponse(["error" => $this->trans->t("Not permitted")]);
}

$fileName = $file->getName();
$ext = strtolower(pathinfo($fileName, PATHINFO_EXTENSION));
$format = !empty($ext) ? $this->config->FormatsSetting()[$ext] : null;
Expand Down Expand Up @@ -394,6 +398,14 @@ public function config($fileId, $filePath = null, $shareToken = null, $version =
$params["type"] = "mobile";
}

if (!$template
&& $file->isUpdateable()
&& !$isPersistentLock
&& (empty($shareToken) || ($share->getPermissions() & Constants::PERMISSION_UPDATE) === Constants::PERMISSION_UPDATE)) {

$params["document"]["permissions"]["changeHistory"] = true;
}

if (!empty($userId)) {
$params["editorConfig"]["user"] = [
"id" => $this->buildUserId($userId),
Expand Down Expand Up @@ -428,14 +440,14 @@ public function config($fileId, $filePath = null, $shareToken = null, $version =
$folderLink = $this->urlGenerator->linkToRouteAbsolute("files.view.index", $linkAttr);
}

switch($params["documentType"]) {
case "text":
switch ($params["documentType"]) {
case "word":
$createName = $this->trans->t("Document") . ".docx";
break;
case "spreadsheet":
case "cell":
$createName = $this->trans->t("Spreadsheet") . ".xlsx";
break;
case "presentation":
case "slide":
$createName = $this->trans->t("Presentation") . ".pptx";
break;
}
Expand Down
Loading

0 comments on commit d55fa87

Please sign in to comment.