diff --git a/CHANGELOG.md b/CHANGELOG.md
index b1642b71..a798c7aa 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,16 @@
# Change Log
+## 7.8.1
+## Added
+- disable plugins setting
+- document protection setting
+- jwt leeway setting
+- Danish translation
+
+## Changed
+- fix notification length
+- additional check availability for external files when mention
+
## 7.6.7
## Added
- Dutch translation
diff --git a/README.md b/README.md
index f4f97418..149e085f 100644
--- a/README.md
+++ b/README.md
@@ -51,7 +51,6 @@ If the server with the ownCloud installed does not have an Internet access, or i
```
2. Get the ownCloud ONLYOFFICE integration app.
-
There are several ways to do that:
a. Download the latest signed version from the official store for [ownCloud](https://marketplace.owncloud.com/apps/onlyoffice).
@@ -59,14 +58,13 @@ There are several ways to do that:
b. Or you can download the latest signed version from the application [release page](https://github.com/ONLYOFFICE/onlyoffice-owncloud/releases) on GitHub.
c. Or you can clone the application source code and compile it yourself:
-
```bash
git clone https://github.com/ONLYOFFICE/onlyoffice-owncloud.git onlyoffice
cd onlyoffice
git submodule update --init --recursive
```
- > ownCloud does not work with unsigned applications giving an alert, so you will need to use either option **a** or **b** to get the application.
+ ownCloud does not work with unsigned applications giving an alert, so you will need to use either option **a** or **b** to get the application.
3. Change the owner to update the application right from ownCloud web interface:
diff --git a/appinfo/app.php b/appinfo/app.php
index c2e1e0ef..bb6cf568 100644
--- a/appinfo/app.php
+++ b/appinfo/app.php
@@ -1,7 +1,7 @@
appConfig->GetJwtLeeway();
+
$container = $this->getContainer();
$detector = $container->query(IMimeTypeDetector::class);
diff --git a/appinfo/info.xml b/appinfo/info.xml
index 465ace3d..a9bc34dd 100644
--- a/appinfo/info.xml
+++ b/appinfo/info.xml
@@ -6,7 +6,7 @@
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.apl2Ascensio System SIA
- 7.6.7
+ 7.8.1Onlyoffice
diff --git a/appinfo/routes.php b/appinfo/routes.php
index f1753747..4698484f 100644
--- a/appinfo/routes.php
+++ b/appinfo/routes.php
@@ -1,7 +1,7 @@
getUID();
}
+ $canProtect = true;
+ if ($this->config->GetProtection() === "owner") {
+ $canProtect = $ownerId === $userId;
+ }
+ $params["document"]["permissions"]["protect"] = $canProtect;
+
$hashCallback = $this->crypt->GetHash(["userId" => $userId, "ownerId" => $ownerId, "fileId" => $file->getId(), "filePath" => $filePath, "shareToken" => $shareToken, "action" => "track"]);
$callback = $this->urlGenerator->linkToRouteAbsolute($this->appName . ".callback.track", ["doc" => $hashCallback]);
@@ -703,6 +709,10 @@ private function setCustomization($params) {
$params["editorConfig"]["customization"]["macros"] = false;
}
+ //default is true
+ if($this->config->GetCustomizationPlugins() === false) {
+ $params["editorConfig"]["customization"]["plugins"] = false;
+ }
/* from system config */
diff --git a/controller/editorcontroller.php b/controller/editorcontroller.php
index 41aa176b..e97fab26 100644
--- a/controller/editorcontroller.php
+++ b/controller/editorcontroller.php
@@ -1,7 +1,7 @@
$this->trans->t("Failed to send notification")];
}
+ foreach ($emails as $email) {
+ $substrToDelete = "+" . $email . " ";
+ $comment = str_replace($substrToDelete, "", $comment);
+ }
+
+ //Length from ownCloud:
+ //https://github.com/owncloud/core/blob/master/lib/private/Notification/Notification.php#L181
+ $maxLen = 64;
+ if (strlen($comment) > $maxLen) {
+ $ending = "...";
+ $comment = substr($comment, 0, ($maxLen - strlen($ending))) . $ending;
+ }
+
$notificationManager = \OC::$server->getNotificationManager();
$notification = $notificationManager->createNotification();
$notification->setApp($this->appName)
@@ -481,7 +494,18 @@ public function mention($fileId, $anchor, $comment, $emails) {
foreach ($recipientIds as $recipientId) {
$recipient = $this->userManager->get($recipientId);
- if (!in_array($recipient, $accessList)) {
+ $isAvailable = in_array($recipient, $accessList);
+
+ if (!$isAvailable
+ && $file->getFileInfo()->getMountPoint() instanceof \OCA\Files_External\Config\ExternalMountPoint) {
+
+ $recipientFolder = $this->root->getUserFolder($recipientId);
+ $recipientFile = $recipientFolder->getById($file->getId());
+
+ $isAvailable = !empty($recipientFile);
+ }
+
+ if (!$isAvailable) {
if (!$canShare) {
continue;
}
diff --git a/controller/federationcontroller.php b/controller/federationcontroller.php
index 90ea7e7a..f6526b68 100644
--- a/controller/federationcontroller.php
+++ b/controller/federationcontroller.php
@@ -1,7 +1,7 @@
$this->config->GetSameTab(),
"preview" => $this->config->GetPreview(),
"versionHistory" => $this->config->GetVersionHistory(),
+ "protection" => $this->config->GetProtection(),
"encryption" => $this->config->checkEncryptionModule(),
"limitGroups" => $this->config->GetLimitGroups(),
"chat" => $this->config->GetCustomizationChat(),
@@ -125,6 +126,7 @@ public function index() {
"help" => $this->config->GetCustomizationHelp(),
"toolbarNoTabs" => $this->config->GetCustomizationToolbarNoTabs(),
"successful" => $this->config->SettingsAreSuccessful(),
+ "plugins" => $this->config->GetCustomizationPlugins(),
"macros" => $this->config->GetCustomizationMacros(),
"reviewDisplay" => $this->config->GetCustomizationReviewDisplay(),
"theme" => $this->config->GetCustomizationTheme(),
@@ -247,13 +249,20 @@ public function SaveCommon($defFormats,
/**
* Save security settings
*
+ * @param bool $plugins - enable plugins
* @param bool $macros - run document macros
+ * @param string $protection - protection
*
* @return array
*/
- public function SaveSecurity($macros) {
+ public function SaveSecurity($plugins,
+ $macros,
+ $protection
+ ) {
+ $this->config->SetCustomizationPlugins($plugins);
$this->config->SetCustomizationMacros($macros);
+ $this->config->SetProtection($protection);
return [
];
diff --git a/controller/templatecontroller.php b/controller/templatecontroller.php
index 7ce91b3f..d9977750 100644
--- a/controller/templatecontroller.php
+++ b/controller/templatecontroller.php
@@ -1,7 +1,7 @@
");
+ var scrollTop = 0;
if ($("#app-content").length) {
$("#app-content").append($iframe);
- var scrollTop = $("#app-content").scrollTop();
- $("#onlyofficeFrame").css("top", scrollTop);
+ scrollTop = $("#app-content").scrollTop();
} else {
$("#preview").append($iframe);
+
+ scrollTop = $("#content-wrapper").scrollTop();
}
+ $("#onlyofficeFrame").css("top", scrollTop);
+
$("body").addClass("onlyoffice-inline");
OC.Apps.hideAppSidebar();
@@ -493,7 +497,7 @@
OCA.Onlyoffice.bindVersionClick = function () {
OCA.Onlyoffice.unbindVersionClick();
$(document).on("click.onlyoffice-version", "#versionsTabView .downloadVersion", function() {
- var ext = $("#app-sidebar .fileName h3").text().split(".").pop();
+ var ext = OCA.Onlyoffice.GetFileExtension($("#app-sidebar .fileName h3").text());
if (!OCA.Onlyoffice.setting.formats[ext]
|| !OCA.Onlyoffice.setting.formats[ext].def) {
return true;
@@ -522,7 +526,7 @@
}
var initPage = function () {
- if ($("#isPublic").val() === "1" && !$("#filestable").length) {
+ if ($("#isPublic").val() === "1" && $("#mimetype").val() !== "httpd/unix-directory") {
var fileName = $("#filename").val();
var extension = OCA.Onlyoffice.GetFileExtension(fileName);
diff --git a/js/settings.js b/js/settings.js
index b00a6a5e..985d24d9 100644
--- a/js/settings.js
+++ b/js/settings.js
@@ -1,6 +1,6 @@
/**
*
- * (c) Copyright Ascensio System SIA 2022
+ * (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.
@@ -172,13 +172,17 @@
$("#onlyofficeSecuritySave").click(function () {
$(".section-onlyoffice").addClass("icon-loading");
+ var plugins = $("#onlyofficePlugins").is(":checked");
var macros = $("#onlyofficeMacros").is(":checked");
+ var protection = $("input[type='radio'][name='protection']:checked").attr("id").replace("onlyofficeProtection_", "");
$.ajax({
method: "PUT",
url: OC.generateUrl("apps/" + OCA.Onlyoffice.AppName + "/ajax/settings/security"),
data: {
- macros: macros
+ plugins: plugins,
+ macros: macros,
+ protection: protection
},
success: function onSuccess(response) {
$(".section-onlyoffice").removeClass("icon-loading");
diff --git a/js/share.js b/js/share.js
index 53faea72..1de32b3a 100644
--- a/js/share.js
+++ b/js/share.js
@@ -1,6 +1,6 @@
/**
*
- * (c) Copyright Ascensio System SIA 2022
+ * (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.
diff --git a/js/template.js b/js/template.js
index 4e823971..6a6e2c24 100644
--- a/js/template.js
+++ b/js/template.js
@@ -1,6 +1,6 @@
/**
*
- * (c) Copyright Ascensio System SIA 2022
+ * (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.
diff --git a/l10n/da.js b/l10n/da.js
new file mode 100644
index 00000000..586a0082
--- /dev/null
+++ b/l10n/da.js
@@ -0,0 +1,117 @@
+OC.L10N.register(
+ "onlyoffice",
+ {
+ "Access denied": "Adgang nægtet",
+ "Invalid request": "Ugyldig anmodning",
+ "Files not found": "Filer ikke fundet",
+ "File not found": "Fil ikke fundet",
+ "Not permitted": "Ikke tilladt",
+ "Download failed": "Download fejlede",
+ "The required folder was not found": "Den nødvendige mappe blev ikke fundet",
+ "You don't have enough permission to create": "Du har ikke tilladelse nok til at oprette",
+ "Template not found": "Skabelonen blev ikke fundet",
+ "Can't create file": "Filen kan ikke oprettes",
+ "Format is not supported": "Format er ikke understøttet",
+ "Conversion is not required": "Konvertering er ikke påkrævet",
+ "Failed to download converted file": "Kunne ikke downloade den konverterede fil",
+ "ONLYOFFICE app is not configured. Please contact admin": "ONLYOFFICE-appen er ikke konfigureret. Kontakt venligst administrator",
+ "FileId is empty": "Fil-ID er tom",
+ "You do not have enough permissions to view the file": "Du har ikke tilstrækkelige tilladelser til at se filen",
+ "Error occurred in the document service": "Der opstod en fejl i dokumenttjenesten",
+ "Not supported version": "Ikke understøttet version",
+ "ONLYOFFICE cannot be reached. Please contact admin": "ONLYOFFICE kan ikke nås. Kontakt venligst administrator",
+ "Loading, please wait.": "Indlæser... vent venligst.",
+ "File created": "Fil oprettet",
+ "Open in ONLYOFFICE": "Åben i ONLYOFFICE",
+ "Convert with ONLYOFFICE": "Konverter med ONLYOFFICE",
+ "Document": "Dokument",
+ "Spreadsheet": "Regneark",
+ "Presentation": "Præsentation",
+ "Error when trying to connect": "Fejl under forsøg på at oprette forbindelse",
+ "Settings have been successfully updated": "Indstillingerne er blevet opdateret",
+ "Server can't read xml": "Serveren kan ikke læse xml",
+ "Bad Response. Errors: ": "Ingen respons. Fejl:",
+ "Documentation": "Dokumentation",
+ "ONLYOFFICE Docs Location specifies the address of the server with the document services installed. Please change the '' for the server address in the below line.": "ONLYOFFICE Docs Lokation angiver adressen på serveren med dokumenttjenesterne installeret. Skift venligst '' for serveradressen i linjen nedenfor.",
+ "Encryption App is enabled, the application cannot work. You can continue working with the application if you enable master key.": "Encryption App is enabled, the application cannot work. You can continue working with the application if you enable master key.",
+ "ONLYOFFICE Docs address": "ONLYOFFICE Docs-adresse",
+ "Advanced server settings": "Avancerede serverindstillinger",
+ "ONLYOFFICE Docs address for internal requests from the server": "ONLYOFFICE Docs-adresse for interne anmodninger fra serveren",
+ "Server address for internal requests from ONLYOFFICE Docs": "Serveradresse for interne anmodninger fra ONLYOFFICE Docs",
+ "Secret key (leave blank to disable)": "Hemmelig nøgle (lad være tom for at deaktivere)",
+ "Open file in the same tab": "Åbn filen i samme fane",
+ "The default application for opening the format": "Standardapplikationen til at åbne formatet",
+ "Open the file for editing (due to format restrictions, the data might be lost when saving to the formats from the list below)": "Åbn filen til redigering (på grund af formatbegrænsninger kan data gå tabt, når du gemmer i formaterne fra listen nedenfor)",
+ "View details": "Se detaljer",
+ "Save": "Gem",
+ "Mixed Active Content is not allowed. HTTPS address for ONLYOFFICE Docs is required.": "Blandet aktivt indhold er ikke tilladt. HTTPS-adresse for ONLYOFFICE Docs er påkrævet.",
+ "Restrict access to editors to following groups": "Begræns adgangen til redaktører til følgende grupper",
+ "review": "Anmeldelse",
+ "form filling": "Formular udfyldning",
+ "comment": "Kommentar",
+ "custom filter": "Brugerdefineret filter",
+ "download": "Hent",
+ "Server settings": "Serverindstillinger",
+ "Common settings": "Fælles indstillinger",
+ "Editor customization settings": "Editor tilpasningsindstillinger",
+ "The customization section allows personalizing the editor interface": "Tilpasningssektionen gør det muligt at tilpasse editorgrænsefladen",
+ "Display Chat menu button": "Vis chatmenuknap",
+ "Display the header more compact": "Vis værktøjslinjen mere kompakt",
+ "Display Feedback & Support menu button": "Vis feedback- og supportmenuknap",
+ "Display Help menu button": "Vis menuknappen Hjælp",
+ "Display monochrome toolbar header": "Vis monokrom værktøjslinje",
+ "Save as": "Gem som",
+ "File saved": "Filen er gemt",
+ "Insert image": "Indsæt billede",
+ "Select recipients": "Vælg modtagere",
+ "Connect to demo ONLYOFFICE Docs server": "Opret forbindelse til demo ONLYOFFICE Docs-server",
+ "This is a public test server, please do not use it for private sensitive data. The server will be available during a 30-day period.": "Dette er en offentlig testserver, brug den venligst ikke til private følsomme data. Serveren vil være tilgængelig i en 30-dages periode.",
+ "The 30-day test period is over, you can no longer connect to demo ONLYOFFICE Docs server.": "30-dages testperioden er forbi, du kan ikke længere oprette forbindelse til demo ONLYOFFICE Docs-server.",
+ "You are using public demo ONLYOFFICE Docs server. Please do not store private sensitive data.": "Du bruger den offentlige demo ONLYOFFICE Docs-server. Gem venligst ikke private følsomme data.",
+ "Select file to compare": "Vælg fil for at sammenligne",
+ "Review mode for viewing": "Gennemgangstilstand for visning",
+ "Markup": "Kladde",
+ "Final": "Endelig",
+ "Original": "Original",
+ "version": "version",
+ "Disable certificate verification (insecure)": "Deaktiver certifikatbekræftelse (usikker)",
+ "Keep intermediate versions when editing (forcesave)": "Behold mellemversioner under redigering (tvangsgem)",
+ "Use ONLYOFFICE to generate a document preview (it will take up disk space)": "Brug ONLYOFFICE til at generere et dokumenteksempel (...dette vil optage diskplads)",
+ "Keep metadata for each version once the document is edited (it will take up disk space)": "Gem metadata for hver version, når dokumentet er redigeret (...dette vil optage diskplads)",
+ "Clear": "Klar",
+ "All history successfully deleted": "Al historik blev slettet",
+ "Create": "Opret",
+ "Select template": "Vælg skabelon",
+ "Invalid file provided": "Ugyldig fil angivet",
+ "Empty": "Tom",
+ "Error": "Fejl",
+ "Add a new template": "Tilføj en ny skabelon",
+ "Template already exists": "Skabelonen findes allerede",
+ "Template must be in OOXML format": "Skabelonen skal være i OOXML-format",
+ "Template successfully added": "Skabelon blev tilføjet",
+ "Template successfully deleted": "Skabelonen blev slettet",
+ "Common templates": "Fælles skabeloner",
+ "Failed to delete template": "Skabelonen kunne ikke slettes",
+ "File has been converted. Its content might look different.": "Filen er blevet konverteret. Dens indhold kan se anderledes ud.",
+ "Download as": "Download som",
+ "Download": "Hent",
+ "Origin format": "Oprindelsesformat",
+ "Failed to send notification": "Kunne ikke sende notifikation",
+ "Notification sent successfully": "Meddelelse sendt",
+ "%1\$s mentioned in the %2\$s: \"%3\$s\".": "%1\$s nævnt i %2\$s: \"%3\$s\".",
+ "Choose a format to convert {fileName}": "Vælg et format til at konvertere {fileName}",
+ "Form template": "Formularskabelon",
+ "Form template from existing text file": "Formularskabelon fra eksisterende tekstfil",
+ "Create form": "Opret formular",
+ "Fill in form in ONLYOFFICE": "Udfyld formularen i ONLYOFFICE",
+ "Create new Form template": "Opret ny formularskabelon",
+ "Please update ONLYOFFICE Docs to version 7.0 to work on fillable forms online": "Opdater venligst ONLYOFFICE Docs til version 7.0 for at arbejde på udfyldelige formularer online",
+ "Security": "Sikkerhed",
+ "Run document macros": "Kør dokumentmakroer",
+ "Default editor theme": "Standard editortema",
+ "Light": "Lys",
+ "Classic Light": "Klassisk lys",
+ "Dark": "Mørk",
+ "This feature is unavailable due to encryption settings.": "Denne funktion er utilgængelig på grund af krypteringsindstillingerne"
+},
+"nplurals=2; plural=(n > 1);");
diff --git a/l10n/da.json b/l10n/da.json
new file mode 100644
index 00000000..6223424c
--- /dev/null
+++ b/l10n/da.json
@@ -0,0 +1,116 @@
+{ "translations": {
+ "Access denied": "Adgang nægtet",
+ "Invalid request": "Ugyldig anmodning",
+ "Files not found": "Filer ikke fundet",
+ "File not found": "Fil ikke fundet",
+ "Not permitted": "Ikke tilladt",
+ "Download failed": "Download fejlede",
+ "The required folder was not found": "Den nødvendige mappe blev ikke fundet",
+ "You don't have enough permission to create": "Du har ikke tilladelse nok til at oprette",
+ "Template not found": "Skabelonen blev ikke fundet",
+ "Can't create file": "Filen kan ikke oprettes",
+ "Format is not supported": "Format er ikke understøttet",
+ "Conversion is not required": "Konvertering er ikke påkrævet",
+ "Failed to download converted file": "Kunne ikke downloade den konverterede fil",
+ "ONLYOFFICE app is not configured. Please contact admin": "ONLYOFFICE-appen er ikke konfigureret. Kontakt venligst administrator",
+ "FileId is empty": "Fil-ID er tom",
+ "You do not have enough permissions to view the file": "Du har ikke tilstrækkelige tilladelser til at se filen",
+ "Error occurred in the document service": "Der opstod en fejl i dokumenttjenesten",
+ "Not supported version": "Ikke understøttet version",
+ "ONLYOFFICE cannot be reached. Please contact admin": "ONLYOFFICE kan ikke nås. Kontakt venligst administrator",
+ "Loading, please wait.": "Indlæser... vent venligst.",
+ "File created": "Fil oprettet",
+ "Open in ONLYOFFICE": "Åben i ONLYOFFICE",
+ "Convert with ONLYOFFICE": "Konverter med ONLYOFFICE",
+ "Document": "Dokument",
+ "Spreadsheet": "Regneark",
+ "Presentation": "Præsentation",
+ "Error when trying to connect": "Fejl under forsøg på at oprette forbindelse",
+ "Settings have been successfully updated": "Indstillingerne er blevet opdateret",
+ "Server can't read xml": "Serveren kan ikke læse xml",
+ "Bad Response. Errors: ": "Ingen respons. Fejl:",
+ "Documentation": "Dokumentation",
+ "ONLYOFFICE Docs Location specifies the address of the server with the document services installed. Please change the '' for the server address in the below line.": "ONLYOFFICE Docs Lokation angiver adressen på serveren med dokumenttjenesterne installeret. Skift venligst '' for serveradressen i linjen nedenfor.",
+ "Encryption App is enabled, the application cannot work. You can continue working with the application if you enable master key.": "Encryption App is enabled, the application cannot work. You can continue working with the application if you enable master key.",
+ "ONLYOFFICE Docs address": "ONLYOFFICE Docs-adresse",
+ "Advanced server settings": "Avancerede serverindstillinger",
+ "ONLYOFFICE Docs address for internal requests from the server": "ONLYOFFICE Docs-adresse for interne anmodninger fra serveren",
+ "Server address for internal requests from ONLYOFFICE Docs": "Serveradresse for interne anmodninger fra ONLYOFFICE Docs",
+ "Secret key (leave blank to disable)": "Hemmelig nøgle (lad være tom for at deaktivere)",
+ "Open file in the same tab": "Åbn filen i samme fane",
+ "The default application for opening the format": "Standardapplikationen til at åbne formatet",
+ "Open the file for editing (due to format restrictions, the data might be lost when saving to the formats from the list below)": "Åbn filen til redigering (på grund af formatbegrænsninger kan data gå tabt, når du gemmer i formaterne fra listen nedenfor)",
+ "View details": "Se detaljer",
+ "Save": "Gem",
+ "Mixed Active Content is not allowed. HTTPS address for ONLYOFFICE Docs is required.": "Blandet aktivt indhold er ikke tilladt. HTTPS-adresse for ONLYOFFICE Docs er påkrævet.",
+ "Restrict access to editors to following groups": "Begræns adgangen til redaktører til følgende grupper",
+ "review": "Anmeldelse",
+ "form filling": "Formular udfyldning",
+ "comment": "Kommentar",
+ "custom filter": "Brugerdefineret filter",
+ "download": "Hent",
+ "Server settings": "Serverindstillinger",
+ "Common settings": "Fælles indstillinger",
+ "Editor customization settings": "Editor tilpasningsindstillinger",
+ "The customization section allows personalizing the editor interface": "Tilpasningssektionen gør det muligt at tilpasse editorgrænsefladen",
+ "Display Chat menu button": "Vis chatmenuknap",
+ "Display the header more compact": "Vis værktøjslinjen mere kompakt",
+ "Display Feedback & Support menu button": "Vis feedback- og supportmenuknap",
+ "Display Help menu button": "Vis menuknappen Hjælp",
+ "Display monochrome toolbar header": "Vis monokrom værktøjslinje",
+ "Save as": "Gem som",
+ "File saved": "Filen er gemt",
+ "Insert image": "Indsæt billede",
+ "Select recipients": "Vælg modtagere",
+ "Connect to demo ONLYOFFICE Docs server": "Opret forbindelse til demo ONLYOFFICE Docs-server",
+ "This is a public test server, please do not use it for private sensitive data. The server will be available during a 30-day period.": "Dette er en offentlig testserver, brug den venligst ikke til private følsomme data. Serveren vil være tilgængelig i en 30-dages periode.",
+ "The 30-day test period is over, you can no longer connect to demo ONLYOFFICE Docs server.": "30-dages testperioden er forbi, du kan ikke længere oprette forbindelse til demo ONLYOFFICE Docs-server.",
+ "You are using public demo ONLYOFFICE Docs server. Please do not store private sensitive data.": "Du bruger den offentlige demo ONLYOFFICE Docs-server. Gem venligst ikke private følsomme data.",
+ "Select file to compare": "Vælg fil for at sammenligne",
+ "Review mode for viewing": "Gennemgangstilstand for visning",
+ "Markup": "Kladde",
+ "Final": "Endelig",
+ "Original": "Original",
+ "version": "version",
+ "Disable certificate verification (insecure)": "Deaktiver certifikatbekræftelse (usikker)",
+ "Keep intermediate versions when editing (forcesave)": "Behold mellemversioner under redigering (tvangsgem)",
+ "Use ONLYOFFICE to generate a document preview (it will take up disk space)": "Brug ONLYOFFICE til at generere et dokumenteksempel (...dette vil optage diskplads)",
+ "Keep metadata for each version once the document is edited (it will take up disk space)": "Gem metadata for hver version, når dokumentet er redigeret (...dette vil optage diskplads)",
+ "Clear": "Klar",
+ "All history successfully deleted": "Al historik blev slettet",
+ "Create": "Opret",
+ "Select template": "Vælg skabelon",
+ "Invalid file provided": "Ugyldig fil angivet",
+ "Empty": "Tom",
+ "Error": "Fejl",
+ "Add a new template": "Tilføj en ny skabelon",
+ "Template already exists": "Skabelonen findes allerede",
+ "Template must be in OOXML format": "Skabelonen skal være i OOXML-format",
+ "Template successfully added": "Skabelon blev tilføjet",
+ "Template successfully deleted": "Skabelonen blev slettet",
+ "Common templates": "Fælles skabeloner",
+ "Failed to delete template": "Skabelonen kunne ikke slettes",
+ "File has been converted. Its content might look different.": "Filen er blevet konverteret. Dens indhold kan se anderledes ud.",
+ "Download as": "Download som",
+ "Download": "Hent",
+ "Origin format": "Oprindelsesformat",
+ "Failed to send notification": "Kunne ikke sende notifikation",
+ "Notification sent successfully": "Meddelelse sendt",
+ "%1$s mentioned in the %2$s: \"%3$s\".": "%1$s nævnt i %2$s: \"%3$s\".",
+ "Choose a format to convert {fileName}": "Vælg et format til at konvertere {fileName}",
+ "Form template": "Formularskabelon",
+ "Form template from existing text file": "Formularskabelon fra eksisterende tekstfil",
+ "Create form": "Opret formular",
+ "Fill in form in ONLYOFFICE": "Udfyld formularen i ONLYOFFICE",
+ "Create new Form template": "Opret ny formularskabelon",
+ "Please update ONLYOFFICE Docs to version 7.0 to work on fillable forms online": "Opdater venligst ONLYOFFICE Docs til version 7.0 for at arbejde på udfyldelige formularer online",
+ "Security": "Sikkerhed",
+ "Run document macros": "Kør dokumentmakroer",
+ "Default editor theme": "Standard editortema",
+ "Light": "Lys",
+ "Classic Light": "Klassisk lys",
+ "Dark": "Mørk",
+ "This feature is unavailable due to encryption settings.": "Denne funktion er utilgængelig på grund af krypteringsindstillingerne"
+},
+ "pluralForm": "nplurals=2; plural=(n > 1);"
+}
\ No newline at end of file
diff --git a/l10n/de.js b/l10n/de.js
index 34f0819a..83d14e60 100644
--- a/l10n/de.js
+++ b/l10n/de.js
@@ -112,6 +112,10 @@ OC.L10N.register(
"Light": "Hell",
"Classic Light": "Klassisch Hell",
"Dark": "Dunkel",
- "This feature is unavailable due to encryption settings.": "Diese Funktion ist wegen der Verschlüsselungseinstellungen nicht verfügbar"
+ "This feature is unavailable due to encryption settings.": "Diese Funktion ist wegen der Verschlüsselungseinstellungen nicht verfügbar",
+ "Enable plugins": "Arbeit mit Plugins aktivieren",
+ "Enable document protection for": "Hinzufügen von Passwörtern in Dokumenten aktivieren für",
+ "All users": "Alle Benutzer",
+ "Owner only": "Nur Besitzer"
},
"nplurals=2; plural=(n != 1);");
diff --git a/l10n/de.json b/l10n/de.json
index 5ca5d55f..b2af90dc 100644
--- a/l10n/de.json
+++ b/l10n/de.json
@@ -110,6 +110,10 @@
"Light": "Hell",
"Classic Light": "Klassisch Hell",
"Dark": "Dunkel",
- "This feature is unavailable due to encryption settings.": "Diese Funktion ist wegen der Verschlüsselungseinstellungen nicht verfügbar"
+ "This feature is unavailable due to encryption settings.": "Diese Funktion ist wegen der Verschlüsselungseinstellungen nicht verfügbar",
+ "Enable plugins": "Arbeit mit Plugins aktivieren",
+ "Enable document protection for": "Hinzufügen von Passwörtern in Dokumenten aktivieren für",
+ "All users": "Alle Benutzer",
+ "Owner only": "Nur Besitzer"
},"pluralForm" :"nplurals=2; plural=(n != 1);"
}
\ No newline at end of file
diff --git a/l10n/de_DE.js b/l10n/de_DE.js
index cf22598b..2becdc1d 100644
--- a/l10n/de_DE.js
+++ b/l10n/de_DE.js
@@ -112,6 +112,10 @@ OC.L10N.register(
"Light": "Hell",
"Classic Light": "Klassisch Hell",
"Dark": "Dunkel",
- "This feature is unavailable due to encryption settings.": "Diese Funktion ist wegen der Verschlüsselungseinstellungen nicht verfügbar"
+ "This feature is unavailable due to encryption settings.": "Diese Funktion ist wegen der Verschlüsselungseinstellungen nicht verfügbar",
+ "Enable plugins": "Arbeit mit Plugins aktivieren",
+ "Enable document protection for": "Hinzufügen von Passwörtern in Dokumenten aktivieren für",
+ "All users": "Alle Benutzer",
+ "Owner only": "Nur Besitzer"
},
"nplurals=2; plural=(n != 1);");
diff --git a/l10n/de_DE.json b/l10n/de_DE.json
index 5c2ec3a3..05c7fcd9 100644
--- a/l10n/de_DE.json
+++ b/l10n/de_DE.json
@@ -110,6 +110,10 @@
"Light": "Hell",
"Classic Light": "Klassisch Hell",
"Dark": "Dunkel",
- "This feature is unavailable due to encryption settings.": "Diese Funktion ist wegen der Verschlüsselungseinstellungen nicht verfügbar"
+ "This feature is unavailable due to encryption settings.": "Diese Funktion ist wegen der Verschlüsselungseinstellungen nicht verfügbar",
+ "Enable plugins": "Arbeit mit Plugins aktivieren",
+ "Enable document protection for": "Hinzufügen von Passwörtern in Dokumenten aktivieren für",
+ "All users": "Alle Benutzer",
+ "Owner only": "Nur Besitzer"
},"pluralForm" :"nplurals=2; plural=(n != 1);"
}
\ No newline at end of file
diff --git a/l10n/es.js b/l10n/es.js
index 94d1546f..28d6df4b 100644
--- a/l10n/es.js
+++ b/l10n/es.js
@@ -112,6 +112,10 @@ OC.L10N.register(
"Light": "Claro",
"Classic Light": "Clásico claro",
"Dark": "Oscuro",
- "This feature is unavailable due to encryption settings.": "Esta característica no está disponible debido a la configuración de cifrado."
+ "This feature is unavailable due to encryption settings.": "Esta característica no está disponible debido a la configuración de cifrado.",
+ "Enable plugins": "Habilitar plugins",
+ "Enable document protection for": "Habilitar la protección de documentos para",
+ "All users": "Todos los usuarios",
+ "Owner only": "Solo propietario"
},
"nplurals=2; plural=(n != 1);");
diff --git a/l10n/es.json b/l10n/es.json
index 7f6a203e..a58da59f 100644
--- a/l10n/es.json
+++ b/l10n/es.json
@@ -110,6 +110,10 @@
"Light": "Claro",
"Classic Light": "Clásico claro",
"Dark": "Oscuro",
- "This feature is unavailable due to encryption settings.": "Esta característica no está disponible debido a la configuración de cifrado."
+ "This feature is unavailable due to encryption settings.": "Esta característica no está disponible debido a la configuración de cifrado.",
+ "Enable plugins": "Habilitar plugins",
+ "Enable document protection for": "Habilitar la protección de documentos para",
+ "All users": "Todos los usuarios",
+ "Owner only": "Solo propietario"
},"pluralForm" :"nplurals=2; plural=(n != 1);"
}
\ No newline at end of file
diff --git a/l10n/fr.js b/l10n/fr.js
index 8f6c5fef..b9d60c6b 100644
--- a/l10n/fr.js
+++ b/l10n/fr.js
@@ -112,6 +112,10 @@ OC.L10N.register(
"Light": "Clair",
"Classic Light": "Classique clair",
"Dark": "Sombre",
- "This feature is unavailable due to encryption settings.": "Cette fonctionnalité n'est pas disponible en raison des paramètres de chiffrement."
+ "This feature is unavailable due to encryption settings.": "Cette fonctionnalité n'est pas disponible en raison des paramètres de chiffrement.",
+ "Enable plugins": "Activer les plugins",
+ "Enable document protection for": "Activer la protection des documents par mot de passe pour",
+ "All users": "Tous les utilisateurs",
+ "Owner only": "Propriétaire uniquement"
},
"nplurals=2; plural=(n > 1);");
diff --git a/l10n/fr.json b/l10n/fr.json
index 40d2868a..34344ddd 100644
--- a/l10n/fr.json
+++ b/l10n/fr.json
@@ -110,6 +110,10 @@
"Light": "Clair",
"Classic Light": "Classique clair",
"Dark": "Sombre",
- "This feature is unavailable due to encryption settings.": "Cette fonctionnalité n'est pas disponible en raison des paramètres de chiffrement."
+ "This feature is unavailable due to encryption settings.": "Cette fonctionnalité n'est pas disponible en raison des paramètres de chiffrement.",
+ "Enable plugins": "Activer les plugins",
+ "Enable document protection for": "Activer la protection des documents par mot de passe pour",
+ "All users": "Tous les utilisateurs",
+ "Owner only": "Propriétaire uniquement"
},"pluralForm" :"nplurals=2; plural=(n > 1);"
}
\ No newline at end of file
diff --git a/l10n/it.js b/l10n/it.js
index 48d03176..8338b245 100644
--- a/l10n/it.js
+++ b/l10n/it.js
@@ -112,6 +112,10 @@ OC.L10N.register(
"Light": "Chiaro",
"Classic Light": "Classico chiaro",
"Dark": "Scuro",
- "This feature is unavailable due to encryption settings.": "Questa funzionalità non è disponibile a causa delle impostazioni di crittografia."
+ "This feature is unavailable due to encryption settings.": "Questa funzionalità non è disponibile a causa delle impostazioni di crittografia.",
+ "Enable plugins": "Abilitare plugin",
+ "Enable document protection for": "Abilitare la protezione del documento per",
+ "All users": "Tutti gli utenti",
+ "Owner only": "Solo proprietario"
},
"nplurals=2; plural=(n != 1);");
\ No newline at end of file
diff --git a/l10n/it.json b/l10n/it.json
index 884550ea..d18a8601 100644
--- a/l10n/it.json
+++ b/l10n/it.json
@@ -110,6 +110,10 @@
"Light": "Chiaro",
"Classic Light": "Classico chiaro",
"Dark": "Scuro",
- "This feature is unavailable due to encryption settings.": "Questa funzionalità non è disponibile a causa delle impostazioni di crittografia."
+ "This feature is unavailable due to encryption settings.": "Questa funzionalità non è disponibile a causa delle impostazioni di crittografia.",
+ "Enable plugins": "Abilitare plugin",
+ "Enable document protection for": "Abilitare la protezione del documento per",
+ "All users": "Tutti gli utenti",
+ "Owner only": "Solo proprietario"
},"pluralForm" :"nplurals=2; plural=(n != 1);"
}
\ No newline at end of file
diff --git a/l10n/ja.js b/l10n/ja.js
index 65aef8d7..315005f3 100644
--- a/l10n/ja.js
+++ b/l10n/ja.js
@@ -112,6 +112,10 @@ OC.L10N.register(
"Light": "明るい",
"Classic Light": "ライト(クラシック)",
"Dark": "ダーク",
- "This feature is unavailable due to encryption settings.": "この機能は暗号化の設定により使用できません。"
+ "This feature is unavailable due to encryption settings.": "この機能は暗号化の設定により使用できません。",
+ "Enable plugins": "プラグインを有効にする",
+ "Enable document protection for": "次のユーザーに対して文書の保護機能を有効にする",
+ "All users": "すべてのユーザー",
+ "Owner only": "所有者のみ"
},
"nplurals=1; plural=0;");
diff --git a/l10n/ja.json b/l10n/ja.json
index a53ffe76..45971a92 100644
--- a/l10n/ja.json
+++ b/l10n/ja.json
@@ -110,6 +110,10 @@
"Light": "明るい",
"Classic Light": "ライト(クラシック)",
"Dark": "ダーク",
- "This feature is unavailable due to encryption settings.": "この機能は暗号化の設定により使用できません。"
+ "This feature is unavailable due to encryption settings.": "この機能は暗号化の設定により使用できません。",
+ "Enable plugins": "プラグインを有効にする",
+ "Enable document protection for": "次のユーザーに対して文書の保護機能を有効にする",
+ "All users": "すべてのユーザー",
+ "Owner only": "所有者のみ"
},"pluralForm" :"nplurals=1; plural=0;"
}
\ No newline at end of file
diff --git a/l10n/pt_BR.js b/l10n/pt_BR.js
index cc241275..4438622f 100644
--- a/l10n/pt_BR.js
+++ b/l10n/pt_BR.js
@@ -109,6 +109,10 @@ OC.L10N.register(
"Security": "Segurança",
"Light": "Claro",
"Classic Light": "Clássico claro",
- "Dark": "Escuro"
+ "Dark": "Escuro",
+ "Enable plugins": "Ativar plug-ins",
+ "Enable document protection for": "Ativar proteção de documento para",
+ "All users": "Todos os usuários",
+ "Owner only": "Somente proprietário"
},
"nplurals=2; plural=(n > 1);");
diff --git a/l10n/pt_BR.json b/l10n/pt_BR.json
index 0e973039..84d22e16 100644
--- a/l10n/pt_BR.json
+++ b/l10n/pt_BR.json
@@ -107,6 +107,10 @@
"Security": "Segurança",
"Light": "Claro",
"Classic Light": "Clássico claro",
- "Dark": "Escuro"
+ "Dark": "Escuro",
+ "Enable plugins": "Ativar plug-ins",
+ "Enable document protection for": "Ativar proteção de documento para",
+ "All users": "Todos os usuários",
+ "Owner only": "Somente proprietário"
},"pluralForm" :"nplurals=2; plural=(n > 1);"
}
diff --git a/l10n/ru.js b/l10n/ru.js
index 014914d6..4f698bd0 100644
--- a/l10n/ru.js
+++ b/l10n/ru.js
@@ -112,6 +112,10 @@ OC.L10N.register(
"Light": "Светлая",
"Classic Light": "Светлая классическая",
"Dark": "Темная",
- "This feature is unavailable due to encryption settings.": "Данная функция недоступна из-за настроек шифрования"
+ "This feature is unavailable due to encryption settings.": "Данная функция недоступна из-за настроек шифрования",
+ "Enable plugins": "Включить работу с плагинами",
+ "Enable document protection for": "Включить возможность задавать пароль на документ для",
+ "All users": "Всех пользователей",
+ "Owner only": "Только владельцу"
},
"nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);");
diff --git a/l10n/ru.json b/l10n/ru.json
index fb8dd710..13cc0fd2 100644
--- a/l10n/ru.json
+++ b/l10n/ru.json
@@ -110,6 +110,10 @@
"Light": "Светлая",
"Classic Light": "Светлая классическая",
"Dark": "Темная",
- "This feature is unavailable due to encryption settings.": "Данная функция недоступна из-за настроек шифрования"
+ "This feature is unavailable due to encryption settings.": "Данная функция недоступна из-за настроек шифрования",
+ "Enable plugins": "Включить работу с плагинами",
+ "Enable document protection for": "Включить возможность задавать пароль на документ для",
+ "All users": "Всех пользователей",
+ "Owner only": "Только владельцу"
},"pluralForm" :"nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);"
}
\ No newline at end of file
diff --git a/l10n/zh_CN.js b/l10n/zh_CN.js
index 1de4310d..c9ee95f2 100644
--- a/l10n/zh_CN.js
+++ b/l10n/zh_CN.js
@@ -111,6 +111,10 @@ OC.L10N.register(
"Light": "光",
"Classic Light": "经典浅色",
"Dark": "黑暗的",
- "This feature is unavailable due to encryption settings.": "由于加密设置,该功能不可用。"
+ "This feature is unavailable due to encryption settings.": "由于加密设置,该功能不可用。",
+ "Enable plugins": "启用插件",
+ "Enable document protection for": "为以下用户启用文档保护",
+ "All users": "所有用户",
+ "Owner only": "仅限所有者"
},
"nplurals=1; plural=0;");
diff --git a/l10n/zh_CN.json b/l10n/zh_CN.json
index dd0f0e3b..f77782e3 100644
--- a/l10n/zh_CN.json
+++ b/l10n/zh_CN.json
@@ -109,6 +109,10 @@
"Light": "光",
"Classic Light": "经典浅色",
"Dark": "黑暗的",
- "This feature is unavailable due to encryption settings.": "由于加密设置,该功能不可用。"
+ "This feature is unavailable due to encryption settings.": "由于加密设置,该功能不可用。",
+ "Enable plugins": "启用插件",
+ "Enable document protection for": "为以下用户启用文档保护",
+ "All users": "所有用户",
+ "Owner only": "仅限所有者"
},"pluralForm" :"nplurals=1; plural=0;"
}
\ No newline at end of file
diff --git a/lib/adminsettings.php b/lib/adminsettings.php
index eadb80db..84994fa3 100644
--- a/lib/adminsettings.php
+++ b/lib/adminsettings.php
@@ -1,7 +1,7 @@
config->getAppValue($this->appName, $this->_versionHistory, "true") === "true";
}
+ /**
+ * Save protection
+ *
+ * @param bool $value - version history
+ */
+ public function SetProtection($value) {
+ $this->logger->info("Set protection: " . $value, ["app" => $this->appName]);
+
+ $this->config->setAppValue($this->appName, $this->_protection, $value);
+ }
+
+ /**
+ * Get protection
+ *
+ * @return bool
+ */
+ public function GetProtection() {
+ $value = $this->config->getAppValue($this->appName, $this->_protection, "owner");
+ if ($value === "all") {
+ return "all";
+ }
+ return "owner";
+ }
+
/**
* Save chat display setting
*
@@ -869,6 +914,26 @@ public function GetCustomizationMacros() {
return $this->config->getAppValue($this->appName, $this->_customization_macros, "true") === "true";
}
+ /**
+ * Save plugins setting
+ *
+ * @param bool $value - enable macros
+ */
+ public function SetCustomizationPlugins($value) {
+ $this->logger->info("Set plugins enabled: " . json_encode($value), ["app" => $this->appName]);
+
+ $this->config->setAppValue($this->appName, $this->_customizationPlugins, json_encode($value));
+ }
+
+ /**
+ * Get plugins setting
+ *
+ * @return bool
+ */
+ public function GetCustomizationPlugins() {
+ return $this->config->getAppValue($this->appName, $this->_customizationPlugins, "true") === "true";
+ }
+
/**
* Save the list of groups
*
@@ -1004,6 +1069,17 @@ public function JwtHeader() {
return $header;
}
+ /**
+ * Get the Jwt Leeway
+ *
+ * @return int
+ */
+ public function GetJwtLeeway() {
+ $jwtLeeway = (integer)$this->GetSystemValue($this->_jwtLeeway);
+
+ return $jwtLeeway;
+ }
+
/**
* Save the status settings
*
diff --git a/lib/command/documentserver.php b/lib/command/documentserver.php
index 2d878e96..4e750ed4 100644
--- a/lib/command/documentserver.php
+++ b/lib/command/documentserver.php
@@ -1,7 +1,7 @@
logger->logException($e, ["message" => "Failed to request federated key " . $file->getId(), "app" => $this->appName]);
+ $key = RemoteInstance::getRemoteKey($file);
+ if (!empty($key)) {
+ return $key;
}
}
diff --git a/lib/fileversions.php b/lib/fileversions.php
index 51642754..c0eb145d 100644
--- a/lib/fileversions.php
+++ b/lib/fileversions.php
@@ -1,7 +1,7 @@
getHTTPClientService();
$client = $httpClientService->newClient();
- $response = $client->post($remote . "/ocs/v2.php/apps/" . self::App_Name . "/api/v1/key?format=json", [
- "timeout" => 5,
- "json" => [
- "shareToken" => $shareToken,
- "path" => $internalPath
- ]
- ]);
- $body = \json_decode($response->getBody(), true);
- $data = $body["ocs"]["data"];
- if (!empty($data["error"])) {
- $logger->error("Error federated key " . $data["error"], ["app" => self::App_Name]);
- return null;
- }
+ try {
+ $response = $client->post($remote . "/ocs/v2.php/apps/" . self::App_Name . "/api/v1/key?format=json", [
+ "timeout" => 5,
+ "json" => [
+ "shareToken" => $shareToken,
+ "path" => $internalPath
+ ]
+ ]);
- $key = $data["key"];
- $logger->debug("Federated key: $key", ["app" => self::App_Name]);
+ $body = \json_decode($response->getBody(), true);
- return $key;
+ $data = $body["ocs"]["data"];
+ if (!empty($data["error"])) {
+ $logger->error("Error federated key " . $data["error"], ["app" => self::App_Name]);
+ return null;
+ }
+
+ $key = $data["key"];
+ $logger->debug("Federated key: $key", ["app" => self::App_Name]);
+
+ return $key;
+ } catch (\Exception $e) {
+ $logger->logException($e, ["message" => "Failed to request federated key " . $file->getId(), "app" => self::App_Name]);
+
+ if ($e->getResponse()->getStatusCode() === 404) {
+ self::update($remote, false);
+ $logger->debug("Changed status for remote instance $remote to false", ["app" => self::App_Name]);
+ }
+
+ return null;
+ }
}
/**
diff --git a/lib/templatemanager.php b/lib/templatemanager.php
index 116d3d50..bdcf2bf7 100644
--- a/lib/templatemanager.php
+++ b/lib/templatemanager.php
@@ -1,7 +1,7 @@