[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:
co-authored by
Viktor Scharf
Viktor Scharf
parent
e4402d9b17
commit
7dcdc53127
@@ -1272,6 +1272,10 @@ func (f *FileConnector) CheckFileInfo(ctx context.Context) (*ConnectorResponse,
|
|||||||
|
|
||||||
fileinfo.KeyPostMessageOrigin: f.cfg.Commons.OpenCloudURL,
|
fileinfo.KeyPostMessageOrigin: f.cfg.Commons.OpenCloudURL,
|
||||||
fileinfo.KeyLicenseCheckForEditIsEnabled: f.cfg.App.LicenseCheckEnable,
|
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 {
|
switch wopiContext.ViewMode {
|
||||||
|
|||||||
@@ -1780,7 +1780,7 @@ var _ = Describe("FileConnector", func() {
|
|||||||
OwnerID: "61616262636340637573746f6d496470", // hex of aabbcc@customIdp
|
OwnerID: "61616262636340637573746f6d496470", // hex of aabbcc@customIdp
|
||||||
Size: int64(998877),
|
Size: int64(998877),
|
||||||
BaseFileName: "test.txt",
|
BaseFileName: "test.txt",
|
||||||
UserCanNotWriteRelative: false,
|
UserCanNotWriteRelative: true,
|
||||||
DisableExport: true,
|
DisableExport: true,
|
||||||
DisableCopy: true,
|
DisableCopy: true,
|
||||||
DisablePrint: true,
|
DisablePrint: true,
|
||||||
@@ -1962,7 +1962,7 @@ var _ = Describe("FileConnector", func() {
|
|||||||
OwnerID: "61616262636340637573746f6d496470", // hex of aabbcc@customIdp
|
OwnerID: "61616262636340637573746f6d496470", // hex of aabbcc@customIdp
|
||||||
Size: int64(998877),
|
Size: int64(998877),
|
||||||
BaseFileName: "test.txt",
|
BaseFileName: "test.txt",
|
||||||
UserCanNotWriteRelative: false,
|
UserCanNotWriteRelative: true,
|
||||||
DisableExport: true,
|
DisableExport: true,
|
||||||
DisableCopy: true,
|
DisableCopy: true,
|
||||||
DisablePrint: true,
|
DisablePrint: true,
|
||||||
|
|||||||
@@ -99,7 +99,7 @@ func (cinfo *Collabora) SetProperties(props map[string]interface{}) {
|
|||||||
case KeyUserCanWrite:
|
case KeyUserCanWrite:
|
||||||
cinfo.UserCanWrite = value.(bool)
|
cinfo.UserCanWrite = value.(bool)
|
||||||
case KeyUserCanNotWriteRelative:
|
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:
|
case KeyUserID:
|
||||||
cinfo.UserID = value.(string)
|
cinfo.UserID = value.(string)
|
||||||
case KeyUserFriendlyName:
|
case KeyUserFriendlyName:
|
||||||
|
|||||||
@@ -183,7 +183,7 @@ Feature: check file info with different wopi apps
|
|||||||
"const": true
|
"const": true
|
||||||
},
|
},
|
||||||
"UserCanNotWriteRelative": {
|
"UserCanNotWriteRelative": {
|
||||||
"const": false
|
"const": true
|
||||||
},
|
},
|
||||||
"EnableOwnerTermination": {
|
"EnableOwnerTermination": {
|
||||||
"const": true
|
"const": true
|
||||||
@@ -581,7 +581,7 @@ Feature: check file info with different wopi apps
|
|||||||
"const": <user-can-write>
|
"const": <user-can-write>
|
||||||
},
|
},
|
||||||
"UserCanNotWriteRelative": {
|
"UserCanNotWriteRelative": {
|
||||||
"const": false
|
"const": true
|
||||||
},
|
},
|
||||||
"EnableOwnerTermination": {
|
"EnableOwnerTermination": {
|
||||||
"const": true
|
"const": true
|
||||||
@@ -691,7 +691,7 @@ Feature: check file info with different wopi apps
|
|||||||
"const": true
|
"const": true
|
||||||
},
|
},
|
||||||
"UserCanNotWriteRelative": {
|
"UserCanNotWriteRelative": {
|
||||||
"const": false
|
"const": true
|
||||||
},
|
},
|
||||||
"EnableOwnerTermination": {
|
"EnableOwnerTermination": {
|
||||||
"const": true
|
"const": true
|
||||||
@@ -1077,7 +1077,7 @@ Feature: check file info with different wopi apps
|
|||||||
"const": true
|
"const": true
|
||||||
},
|
},
|
||||||
"UserCanNotWriteRelative": {
|
"UserCanNotWriteRelative": {
|
||||||
"const": false
|
"const": true
|
||||||
},
|
},
|
||||||
"EnableOwnerTermination": {
|
"EnableOwnerTermination": {
|
||||||
"const": true
|
"const": true
|
||||||
@@ -1424,7 +1424,7 @@ Feature: check file info with different wopi apps
|
|||||||
"const": true
|
"const": true
|
||||||
},
|
},
|
||||||
"UserCanNotWriteRelative": {
|
"UserCanNotWriteRelative": {
|
||||||
"const": false
|
"const": true
|
||||||
},
|
},
|
||||||
"EnableOwnerTermination": {
|
"EnableOwnerTermination": {
|
||||||
"const": true
|
"const": true
|
||||||
@@ -1810,7 +1810,7 @@ Feature: check file info with different wopi apps
|
|||||||
"const": <user-can-write>
|
"const": <user-can-write>
|
||||||
},
|
},
|
||||||
"UserCanNotWriteRelative": {
|
"UserCanNotWriteRelative": {
|
||||||
"const": false
|
"const": true
|
||||||
},
|
},
|
||||||
"EnableOwnerTermination": {
|
"EnableOwnerTermination": {
|
||||||
"const": true
|
"const": true
|
||||||
|
|||||||
Reference in New Issue
Block a user