mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-04-14 12:27:50 -04:00
Merge pull request #2555 from pedropintosilva/feat/enable-insert-remote-file
feat: enable EnableInsertRemoteFile WOPI flag for Collabora
This commit is contained in:
@@ -1267,6 +1267,7 @@ func (f *FileConnector) CheckFileInfo(ctx context.Context) (*ConnectorResponse,
|
||||
|
||||
fileinfo.KeyEnableOwnerTermination: true, // only for collabora
|
||||
fileinfo.KeyEnableInsertRemoteImage: true,
|
||||
fileinfo.KeyEnableInsertRemoteFile: true,
|
||||
fileinfo.KeySupportsExtendedLockLength: true,
|
||||
fileinfo.KeySupportsGetLock: true,
|
||||
fileinfo.KeySupportsLocks: true,
|
||||
|
||||
@@ -1801,6 +1801,7 @@ var _ = Describe("FileConnector", func() {
|
||||
BreadcrumbDocName: "test.txt",
|
||||
PostMessageOrigin: "https://cloud.opencloud.test",
|
||||
EnableInsertRemoteImage: true,
|
||||
EnableInsertRemoteFile: true,
|
||||
IsAnonymousUser: true,
|
||||
}
|
||||
|
||||
@@ -1993,6 +1994,7 @@ var _ = Describe("FileConnector", func() {
|
||||
BreadcrumbDocName: "test.txt",
|
||||
PostMessageOrigin: "https://cloud.opencloud.test",
|
||||
EnableInsertRemoteImage: true,
|
||||
EnableInsertRemoteFile: true,
|
||||
IsAdminUser: true,
|
||||
}
|
||||
|
||||
|
||||
@@ -36,6 +36,8 @@ type Collabora struct {
|
||||
|
||||
// If set to true, this will enable the insertion of images chosen from the WOPI storage. A UI_InsertGraphic postMessage will be send to the WOPI host to request the UI to select the file.
|
||||
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 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.
|
||||
@@ -111,6 +113,8 @@ func (cinfo *Collabora) SetProperties(props map[string]interface{}) {
|
||||
|
||||
case KeyEnableInsertRemoteImage:
|
||||
cinfo.EnableInsertRemoteImage = value.(bool)
|
||||
case KeyEnableInsertRemoteFile:
|
||||
cinfo.EnableInsertRemoteFile = value.(bool)
|
||||
case KeyDisableInsertLocalImage:
|
||||
cinfo.DisableInsertLocalImage = value.(bool)
|
||||
case KeyHidePrintOption:
|
||||
|
||||
@@ -103,6 +103,7 @@ const (
|
||||
KeyTemplateSource = "TemplateSource"
|
||||
|
||||
KeyEnableInsertRemoteImage = "EnableInsertRemoteImage"
|
||||
KeyEnableInsertRemoteFile = "EnableInsertRemoteFile"
|
||||
KeyDisableInsertLocalImage = "DisableInsertLocalImage"
|
||||
KeyHidePrintOption = "HidePrintOption"
|
||||
KeyHideSaveOption = "HideSaveOption"
|
||||
|
||||
Reference in New Issue
Block a user