Merge pull request #2663 from pedropintosilva/feat/enable-remote-link-picker

feat: enable EnableRemoteLinkPicker WOPI flag for Collabora Online
This commit is contained in:
Michael Barz
2026-05-11 16:53:03 +02:00
committed by GitHub
4 changed files with 8 additions and 0 deletions

View File

@@ -1278,6 +1278,7 @@ func (f *FileConnector) CheckFileInfo(ctx context.Context) (*ConnectorResponse,
fileinfo.KeyEnableOwnerTermination: true, // only for collabora
fileinfo.KeyEnableInsertRemoteImage: true,
fileinfo.KeyEnableInsertRemoteFile: true,
fileinfo.KeyEnableRemoteLinkPicker: true,
fileinfo.KeySupportsExtendedLockLength: true,
fileinfo.KeySupportsGetLock: true,
fileinfo.KeySupportsLocks: true,

View File

@@ -1802,6 +1802,7 @@ var _ = Describe("FileConnector", func() {
PostMessageOrigin: "https://cloud.opencloud.test",
EnableInsertRemoteImage: true,
EnableInsertRemoteFile: true,
EnableRemoteLinkPicker: true,
IsAnonymousUser: true,
}
@@ -1995,6 +1996,7 @@ var _ = Describe("FileConnector", func() {
PostMessageOrigin: "https://cloud.opencloud.test",
EnableInsertRemoteImage: true,
EnableInsertRemoteFile: true,
EnableRemoteLinkPicker: true,
IsAdminUser: true,
UserExtraInfo: &fileinfo.UserExtraInfo{
Mail: "shaft@example.com",

View File

@@ -46,6 +46,8 @@ type Collabora struct {
EnableInsertRemoteImage bool `json:"EnableInsertRemoteImage,omitempty"`
// If set to true, this will enable the insertion of remote files chosen from the WOPI storage. A UI_InsertFile postMessage will be sent to the WOPI host to request the UI to select the file. This enables multimedia insertion and document comparison features.
EnableInsertRemoteFile bool `json:"EnableInsertRemoteFile,omitempty"`
// If set to true, this will enable picking a link to a remote file from the WOPI storage. A UI_PickLink postMessage will be sent to the WOPI host to request the UI to select the file. The host is expected to reply with an Action_InsertLink message carrying the file URL.
EnableRemoteLinkPicker bool `json:"EnableRemoteLinkPicker,omitempty"`
// If set to true, this will disable the insertion of image chosen from the local device. If EnableInsertRemoteImage is not set to true, then inserting images files is not possible.
DisableInsertLocalImage bool `json:"DisableInsertLocalImage,omitempty"`
// If set to true, hides the print option from the file menu bar in the UI.
@@ -124,6 +126,8 @@ func (cinfo *Collabora) SetProperties(props map[string]any) {
cinfo.EnableInsertRemoteImage = value.(bool)
case KeyEnableInsertRemoteFile:
cinfo.EnableInsertRemoteFile = value.(bool)
case KeyEnableRemoteLinkPicker:
cinfo.EnableRemoteLinkPicker = value.(bool)
case KeyDisableInsertLocalImage:
cinfo.DisableInsertLocalImage = value.(bool)
case KeyHidePrintOption:

View File

@@ -104,6 +104,7 @@ const (
KeyEnableInsertRemoteImage = "EnableInsertRemoteImage"
KeyEnableInsertRemoteFile = "EnableInsertRemoteFile"
KeyEnableRemoteLinkPicker = "EnableRemoteLinkPicker"
KeyDisableInsertLocalImage = "DisableInsertLocalImage"
KeyHidePrintOption = "HidePrintOption"
KeyHideSaveOption = "HideSaveOption"