Skip to content

Commit

Permalink
Merge pull request #249 from ONLYOFFICE/hotfix/filter
Browse files Browse the repository at this point in the history
Release/2.1.5
  • Loading branch information
LinneyS authored Mar 4, 2019
2 parents 87b07ef + 7804bec commit ab6fe92
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Change Log

## 2.1.5
## Added
- access setting for filter change

## 2.1.3
## Added
- restricting access for groups
Expand Down
2 changes: 1 addition & 1 deletion appinfo/info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<description>ONLYOFFICE connector enables you to edit Office documents within ONLYOFFICE from the familiar web interface. This will create a new Open in ONLYOFFICE action within the document library for Office documents. This allows multiple users to collaborate in real time and to save back those changes to your file storage.</description>
<licence>agpl</licence>
<author>Ascensio System SIA</author>
<version>2.1.3</version>
<version>2.1.5</version>
<namespace>Onlyoffice</namespace>
<types>
<filesystem/>
Expand Down
8 changes: 8 additions & 0 deletions controller/editorcontroller.php
Original file line number Diff line number Diff line change
Expand Up @@ -538,6 +538,14 @@ public function config($fileId, $token = NULL, $desktop = false) {

$params = $this->setCustomization($params);

$permissions_modifyFilter = $this->config->getSystemValue($this->config->_permissions_modifyFilter);
if (isset($permissions_modifyFilter)) {
if (!array_key_exists("permissions", $params["document"])) {
$params["document"]["permissions"] = [];
}
$params["document"]["permissions"]["modifyFilter"] = $permissions_modifyFilter;
}

if (!empty($this->config->GetDocumentServerSecret())) {
$token = \Firebase\JWT\JWT::encode($params, $this->config->GetDocumentServerSecret());
$params["token"] = $token;
Expand Down
7 changes: 7 additions & 0 deletions lib/appconfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,13 @@ class AppConfig {
*/
private $_settingsError = "settings_error";

/**
* The config key for the modifyFilter
*
* @var string
*/
public $_permissions_modifyFilter = "permissions_modifyFilter";

/**
* The config key for the customer
*
Expand Down

0 comments on commit ab6fe92

Please sign in to comment.