opencloud: fix migration (#3744)

* opencloud: fix migration

* opencloud: expose jwt for onlyoffice (#3742)

* opencloud: expose jwt for onlyoffice

* Update ix-dev/community/opencloud/questions.yaml

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Stavros Kois
2025-12-01 11:42:26 +02:00
committed by GitHub
parent 00a16daf70
commit ea4d837db5
4 changed files with 13 additions and 4 deletions

View File

@@ -37,4 +37,4 @@ sources:
- https://hub.docker.com/r/opencloudeu/opencloud-rolling
title: OpenCloud
train: community
version: 1.0.22
version: 1.0.23

View File

@@ -13,4 +13,4 @@ migrations:
from:
max_version: 1.0.20
target:
min_version: 1.0.22
min_version: 1.0.21

View File

@@ -7,14 +7,14 @@ import yaml
def migrate(values):
new_csp = []
for x in values["opencloud"]["additional_csp"]:
for x in values["opencloud"].get("additional_csp", []):
new_item = {"directive": x["directive"], "items": []}
for i in x["items"]:
if isinstance(i, str):
new_item["items"].append({"value": i, "placeholder": ""})
else:
new_item["items"].append(i)
new_csp.append(new_item) # ← This line was missing!
new_csp.append(new_item)
values["opencloud"]["additional_csp"] = new_csp
return values

View File

@@ -112,6 +112,15 @@ questions:
type: boolean
show_if: [["enabled", "=", true]]
default: false
- variable: jwt_secret
label: JWT Secret
description: The JWT secret for OnlyOffice authentication. It must match the secret configured in the OnlyOffice server.
schema:
type: string
show_if: [["enabled", "=", true], ["type", "=", "onlyoffice"]]
default: ""
private: true
required: true
- variable: extra_services
label: Extra Services
description: |