Enhance EditorSession state to include token in active and read-only states; update editor handler to use new Collabora URL

This commit is contained in:
Leon Bösche
2026-01-10 05:05:04 +01:00
parent 84c7ed0815
commit 22868b2958
3 changed files with 9 additions and 7 deletions

View File

@@ -483,7 +483,7 @@ func editorHandler(w http.ResponseWriter, r *http.Request, db *database.DB, audi
// Build Collabora editor URL - Collabora needs the file download URL as the WOPISrc parameter
editUrl := fmt.Sprintf("https://go.b0esche.cloud/orgs/%s/files/download?path=%s", orgID.String(), url.QueryEscape(file.Path))
collaboraUrl := fmt.Sprintf("https://collabora.b0esche.cloud/lool/dist/mobile/cool.html?WOPISrc=%s", url.QueryEscape(editUrl))
collaboraUrl := fmt.Sprintf("https://of.b0esche.cloud/lool/dist/mobile/cool.html?WOPISrc=%s", url.QueryEscape(editUrl))
// Check if user can edit (for now, all org members can edit)
readOnly := false