mirror of
https://github.com/nextcloud/all-in-one.git
synced 2026-09-22 11:10:22 +00:00
block onlyoffice and dsp getting enabled on the backend
Signed-off-by: Simon L. <szaimen@e.mail.de>
This commit is contained in:
@@ -96,6 +96,13 @@ document.addEventListener("DOMContentLoaded", function () {
|
||||
}
|
||||
}
|
||||
|
||||
function handleOnlyofficeWarning() {
|
||||
if (document.getElementById("office-onlyoffice").checked) {
|
||||
alert('⚠️ The ONLYOFFICE container is deprecated. Please use Nextcloud Office powered by Euro-Office instead!');
|
||||
document.getElementById("office-onlyoffice").checked = false
|
||||
}
|
||||
}
|
||||
|
||||
function handleHarpWarning() {
|
||||
if (document.getElementById("harp").checked) {
|
||||
alert('⚠️ Warning! Enabling this container comes with possible Security problems since you are exposing the docker socket and all its privileges to the HaRP container. Enable this only if you are sure what you are doing!');
|
||||
@@ -109,6 +116,9 @@ document.addEventListener("DOMContentLoaded", function () {
|
||||
if (document.getElementById("harp")) {
|
||||
document.getElementById("harp").addEventListener('change', handleHarpWarning);
|
||||
}
|
||||
if (document.getElementById("office-onlyoffice")) {
|
||||
document.getElementById("office-onlyoffice").addEventListener('change', handleOnlyofficeWarning);
|
||||
}
|
||||
|
||||
// Initialize talk-recording visibility on page load
|
||||
handleTalkVisibility(); // Ensure talk-recording is correctly initialized
|
||||
|
||||
@@ -36,7 +36,7 @@ class ConfigurationManager
|
||||
public bool $isDockerSocketProxyEnabled {
|
||||
// Type-cast because old configs could have 1/0 for this key.
|
||||
get => (bool) $this->get('isDockerSocketProxyEnabled', false);
|
||||
set { $this->set('isDockerSocketProxyEnabled', $value); }
|
||||
set { $this->setDockerSocketProxyEnabled($value); }
|
||||
}
|
||||
|
||||
public bool $isHarpEnabled {
|
||||
@@ -407,6 +407,19 @@ class ConfigurationManager
|
||||
return array_key_exists($key, $this->getConfig());
|
||||
}
|
||||
|
||||
/**
|
||||
* The docker socket proxy is deprecated in favor of HaRP. It may stay enabled where it already is, but
|
||||
* must not get enabled anew.
|
||||
*/
|
||||
private function setDockerSocketProxyEnabled(bool $value) : void {
|
||||
// Read via get() because accessing the property inside its own set hook does not invoke the get
|
||||
// hook. Type-cast because old configs could have 1/0 for this key.
|
||||
$isEnabled = (bool) $this->get('isDockerSocketProxyEnabled', false);
|
||||
// ANDing only ever moves the value towards false: disabling always works, while enabling is
|
||||
// ignored unless it is already enabled.
|
||||
$this->set('isDockerSocketProxyEnabled', ($isEnabled && $value));
|
||||
}
|
||||
|
||||
private function unset(string ...$keys) : void {
|
||||
$changed = false;
|
||||
$this->getConfig();
|
||||
@@ -424,6 +437,11 @@ class ConfigurationManager
|
||||
|
||||
private function writeOfficeSuite(OfficeSuite $officeSuite) : void
|
||||
{
|
||||
// Onlyoffice is deprecated in favor of Eurooffice. It may stay selected where it already is, but must
|
||||
// not get selected anew.
|
||||
if ($officeSuite === OfficeSuite::Onlyoffice && $this->readOfficeSuite() !== OfficeSuite::Onlyoffice) {
|
||||
return;
|
||||
}
|
||||
$this->set('officeSuite', $officeSuite->value);
|
||||
// Remove the deprecated options.
|
||||
$this->unset('isCollaboraEnabled', 'isOnlyofficeEnabled', 'isEuroofficeEnabled');
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
<script type="text/javascript" src="timezone.js?v1"></script>
|
||||
|
||||
{# js for optional containers and additional containers forms #}
|
||||
<script type="text/javascript" src="containers-form-submit.js?v8"></script>
|
||||
<script type="text/javascript" src="containers-form-submit.js?v9"></script>
|
||||
|
||||
{% set hasBackupLocation = borg_backup_host_location or borg_remote_repo %}
|
||||
{% set isAnyRunning = false %}
|
||||
|
||||
Reference in New Issue
Block a user