mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2025-12-30 17:00:57 -06:00
[full-ci] fix(collaboration): hide SaveAs and ExportAs buttons in web office (#471)
* fix(collaboration): hide SaveAs and ExportAs buttons in collabora --------- Co-authored-by: Viktor Scharf <v.scharf@opencloud.eu> Co-authored-by: Viktor Scharf <scharf.vi@gmail.com>
This commit is contained in:
@@ -1272,6 +1272,10 @@ func (f *FileConnector) CheckFileInfo(ctx context.Context) (*ConnectorResponse,
|
||||
|
||||
fileinfo.KeyPostMessageOrigin: f.cfg.Commons.OpenCloudURL,
|
||||
fileinfo.KeyLicenseCheckForEditIsEnabled: f.cfg.App.LicenseCheckEnable,
|
||||
|
||||
// set to true for Collabora until we have a web embed mode for "Save As" and "Export As"
|
||||
// see the FIXME in ./fileinfo/collabora.go and https://github.com/opencloud-eu/web/issues/422
|
||||
fileinfo.KeyUserCanNotWriteRelative: false,
|
||||
}
|
||||
|
||||
switch wopiContext.ViewMode {
|
||||
|
||||
@@ -1780,7 +1780,7 @@ var _ = Describe("FileConnector", func() {
|
||||
OwnerID: "61616262636340637573746f6d496470", // hex of aabbcc@customIdp
|
||||
Size: int64(998877),
|
||||
BaseFileName: "test.txt",
|
||||
UserCanNotWriteRelative: false,
|
||||
UserCanNotWriteRelative: true,
|
||||
DisableExport: true,
|
||||
DisableCopy: true,
|
||||
DisablePrint: true,
|
||||
@@ -1962,7 +1962,7 @@ var _ = Describe("FileConnector", func() {
|
||||
OwnerID: "61616262636340637573746f6d496470", // hex of aabbcc@customIdp
|
||||
Size: int64(998877),
|
||||
BaseFileName: "test.txt",
|
||||
UserCanNotWriteRelative: false,
|
||||
UserCanNotWriteRelative: true,
|
||||
DisableExport: true,
|
||||
DisableCopy: true,
|
||||
DisablePrint: true,
|
||||
|
||||
@@ -99,7 +99,7 @@ func (cinfo *Collabora) SetProperties(props map[string]interface{}) {
|
||||
case KeyUserCanWrite:
|
||||
cinfo.UserCanWrite = value.(bool)
|
||||
case KeyUserCanNotWriteRelative:
|
||||
cinfo.UserCanNotWriteRelative = value.(bool)
|
||||
cinfo.UserCanNotWriteRelative = true // FIXME: set to `value.(bool)` again for https://github.com/opencloud-eu/web/issues/422
|
||||
case KeyUserID:
|
||||
cinfo.UserID = value.(string)
|
||||
case KeyUserFriendlyName:
|
||||
|
||||
@@ -183,7 +183,7 @@ Feature: check file info with different wopi apps
|
||||
"const": true
|
||||
},
|
||||
"UserCanNotWriteRelative": {
|
||||
"const": false
|
||||
"const": true
|
||||
},
|
||||
"EnableOwnerTermination": {
|
||||
"const": true
|
||||
@@ -581,7 +581,7 @@ Feature: check file info with different wopi apps
|
||||
"const": <user-can-write>
|
||||
},
|
||||
"UserCanNotWriteRelative": {
|
||||
"const": false
|
||||
"const": true
|
||||
},
|
||||
"EnableOwnerTermination": {
|
||||
"const": true
|
||||
@@ -691,7 +691,7 @@ Feature: check file info with different wopi apps
|
||||
"const": true
|
||||
},
|
||||
"UserCanNotWriteRelative": {
|
||||
"const": false
|
||||
"const": true
|
||||
},
|
||||
"EnableOwnerTermination": {
|
||||
"const": true
|
||||
@@ -1077,7 +1077,7 @@ Feature: check file info with different wopi apps
|
||||
"const": true
|
||||
},
|
||||
"UserCanNotWriteRelative": {
|
||||
"const": false
|
||||
"const": true
|
||||
},
|
||||
"EnableOwnerTermination": {
|
||||
"const": true
|
||||
@@ -1424,7 +1424,7 @@ Feature: check file info with different wopi apps
|
||||
"const": true
|
||||
},
|
||||
"UserCanNotWriteRelative": {
|
||||
"const": false
|
||||
"const": true
|
||||
},
|
||||
"EnableOwnerTermination": {
|
||||
"const": true
|
||||
@@ -1810,7 +1810,7 @@ Feature: check file info with different wopi apps
|
||||
"const": <user-can-write>
|
||||
},
|
||||
"UserCanNotWriteRelative": {
|
||||
"const": false
|
||||
"const": true
|
||||
},
|
||||
"EnableOwnerTermination": {
|
||||
"const": true
|
||||
|
||||
Reference in New Issue
Block a user