Repository navigation
Description
The collaboration service uses the hardcoded strings collabora and onlyoffice to identify the kind of CS3 app provider.
For the app url:
ocis/services/collaboration/pkg/service/grpc/v0/service.go
Lines 163 to 166 in fde6b4c
| if strings.ToLower(s.config.App.Name) == "collabora" { | |
| // collabora provides only one action per extension. usual options | |
| // are "view" (checked above), "edit" or "view_comment" (this last one | |
| // is exclusive of collabora) |
For the language:
ocis/services/collaboration/pkg/service/grpc/v0/service.go
Lines 251 to 255 in fde6b4c
| switch strings.ToLower(s.config.App.Name) { | |
| case "collabora": | |
| q.Add("lang", lang) | |
| case "onlyoffice": | |
| q.Add("ui", lang) |
The type determines the properties returned in the GetFileInfo call:
ocis/services/collaboration/pkg/connector/fileconnector.go
Lines 1150 to 1157 in fde6b4c
| switch strings.ToLower(f.cfg.App.Name) { | |
| case "collabora": | |
| info = &fileinfo.Collabora{} | |
| case "onlyoffice": | |
| info = &fileinfo.OnlyOffice{} | |
| default: | |
| info = &fileinfo.Microsoft{} | |
| } |
We noticed this when reviewing cs3org/reva#4882 (review)
All of these checks will break when the app name has been changed to eg: WebOffice.
The app Name really is a display name that is used by clients. We should introduce a product property on the cs3 api that we can use to handle product specific differences.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
butonic commentedon Oct 15, 2024
cc @micbar
jvillafanez commentedon Oct 17, 2024
#10335 should do for the most part. We still need to send the provider to reva in order to use the templates.
The easiest option might be to send it during app registration (https://github.com/owncloud/ocis/blob/master/services/collaboration/pkg/helpers/registration.go#L64C26-L71), but we'd need to change the cs3apis.
Since the names can change, we'll need to take care of weird chars. Right now, it seems that there is a problem if the
App.Namecontains a space (web shows the name with the space correctly):There could also be problems with the service names (https://github.com/owncloud/ocis/blob/master/services/collaboration/pkg/helpers/registration.go#L69 among others) if the name contains "." or weird chars. We should decide what to do with those.
Finally, this seems a breaking change for Microsoft and OnlyOffice installations (we're using Collabora as default, so they're lucky they won't be hit). If you're using
OnlyOfficeas app name,Collaborawill be used as provider name (assuming you haven't changed it yet), so some features are expected to break. Adding the env variable and restarting the system should be enough to fix the problem though.micbar commentedon Oct 25, 2024
Next step: Start PR on the CS3API to add the ProductName Property on the app.
2403905 commentedon Oct 31, 2024
@micbar There are a lot of changes in a go-sc3 https://github.com/cs3org/go-cs3apis/compare/062c4e3046cb..d50e291
Are we still compatible?
Should we bump go-cs3api?
2403905 commentedon Nov 4, 2024
I prepared the cs3api bump for reva cs3org/reva#4906
I don't see any braking changes cs3api.
2403905 commentedon Nov 4, 2024
@micbar @kobergj The cs3api PR
cs3org/cs3apis#237
micbar commentedon Nov 5, 2024
PR has been merged #10335
wkloucek commentedon Nov 7, 2024
I struggle to use it: owncloud/ocis-charts#799 (comment)
micbar commentedon Nov 7, 2024
Fixed by cs3org/reva#4918