Commit Graph
97 Commits
Author SHA1 Message Date
Florian Schade 26bd26f998 build(deps): bump github.com/opencloud-eu/libre-graph-api-go to 387da64db0b1 2026-08-17 12:29:18 +02:00
Pedro Pinto Silva e9c6e3f17a feat: enable EnableRemoteLinkPicker WOPI flag for Collabora Online
Set EnableRemoteLinkPicker: true in CheckFileInfo response so
Collabora Online exposes its "Smart Picker" UI for link
insertion. Clicking it sends a UI_PickLink postMessage to the WOPI
host, which is expected to reply with Action_InsertLink carrying the
URL of the selected file. Follows the same pattern as the existing
EnableInsertRemoteImage / EnableInsertRemoteFile flags.

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
2026-05-11 15:58:21 +02:00
Florian Schade 288e67cc39 chore: replace interface with any 2026-04-23 09:31:11 +02:00
Jörn Friedrich Dreyer 5683e0d441 Merge pull request #2560 from pedropintosilva/feat/add-userextrainfo-to-checkfileinfo
feat(collaboration): add UserExtraInfo with avatar and mail to CheckFileInfo
2026-04-15 16:07:42 +02:00
Michael Barz 35aaf92384 test: add tests for new features 2026-04-15 12:14:24 +02:00
Michael Barz 940bfe5d65 fix: use libregraph client 2026-04-15 08:00:35 +02:00
Michael Barz d05db011e5 refactor: move implementation to fileconnector 2026-04-14 17:46:45 +02:00
Pedro Pinto Silva 864e20028f feat(collaboration): add UserExtraInfo with avatar and mail to CheckFileInfo
Add UserExtraInfo (avatar + mail) to the WOPI CheckFileInfo response for
authenticated, non-public-share users.

UserExtraInfo format (per Collabora SDK):
https://sdk.collaboraonline.com/docs/advanced_integration.html#userextrainfo

```json
{
  "avatar": "http://url/to/user/avatar",
  "mail": "user@server.com"
}
```

After this change, CheckFileInfo returns:

```json
{
  "BaseFileName": "Pedro-filled-hazcom.docx",
  "UserFriendlyName": "Admin",
  "UserId": "346364...39323030",
  "UserCanWrite": true,
  "UserCanRename": true,
  "IsAdminUser": true,
  "EnableInsertRemoteImage": true,
  "EnableInsertRemoteFile": true,
  "EnableOwnerTermination": true,
  "UserExtraInfo": {
    "avatar": "https://host:9300/wopi/avatars/{userID}?access_token={wopiToken}",
    "mail": "admin@example.org"
  },
  "PostMessageOrigin": "https://localhost:9200",
  "message": "CheckFileInfo: success"
}
```

Avatars are served via a new /wopi/avatars/{userID} endpoint on the
collaboration service, authenticated by the WOPI token. The endpoint
calls the Graph service directly (bypassing the proxy) using the reva
access token via x-access-token header.

All tests pass:
go test ./services/collaboration/... ./services/graph/... ./services/proxy/...

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
2026-04-09 09:08:26 +02:00
Pedro Pinto Silva a4809da471 feat: enable EnableInsertRemoteFile WOPI flag for Collabora
Set EnableInsertRemoteFile: true in CheckFileInfo response so Collabora
shows "Insert Multimedia" and "Compare Document" menu entries. This
triggers UI_InsertFile postMessages to the WOPI host, following the same
pattern as the existing EnableInsertRemoteImage flag.

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
2026-03-31 15:25:55 +02:00
Ralf Haferkamp a2f9cadd9f feat(collaboration): Set IsAnonymousUser flag for Collabora
Closes: #796
2025-11-04 16:45:08 +01:00
Ralf Haferkamp 30ef495c92 feat(collaboration): Set IsAdminUser property for Collabora
This set the 'IsAdminUser' Property correctly in the CheckFileInfo
Response. For that a new Permission 'WebOffice.Manage' is introduced. By
default this permission is only assigned to the Admin role.
User with this permission get access to certain admin features in
Collabora (e.g. the 'Server Audit' dashboard)

Closes: #796
2025-11-04 16:45:08 +01:00
Ralf Haferkamp 589cee4ab3 collaboration: Enable InsertRemoteImage option
Related: https://github.com/opencloud-eu/web/issues/704
2025-11-04 16:01:00 +01:00
Benedikt Kulmann c61392138c feat: re-enable Save As and Export in collabora 2025-06-26 11:46:46 +02:00
7dcdc53127 [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>
2025-03-26 15:06:30 +01:00
André Duffeck e8d35e1280 Use the opencloud reva from now on 2025-01-21 11:16:38 +01:00
Jörn Friedrich Dreyer db39b8ed3b use opencloudurl
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2025-01-16 11:13:08 +01:00
Jörn Friedrich Dreyer 7284acdfeb local occurences
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2025-01-15 11:19:04 +01:00
Jörn Friedrich Dreyer 6a2e433d0b collaboration test urls
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2025-01-15 10:49:29 +01:00
Jörn Friedrich Dreyer b07b5a1149 use plain pkg module
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2025-01-13 16:42:19 +01:00
Jörn Friedrich Dreyer 8e028f17e9 change module name
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2025-01-13 09:58:18 +01:00
Roman Perekhod 8d1f990abd Made GetScopeByKeyPrefix function as a private method of the FileConnector 2024-12-10 10:08:30 +01:00
Roman Perekhod 1d08e9f5ea use the context as a scopes carrier 2024-12-09 14:45:40 +01:00
Roman Perekhod ebfcf5a164 use generic wopiContext.scope decoder 2024-12-09 14:45:39 +01:00
Roman Perekhod 8d83ac4459 fixed the FileInfo.BreadcrumbFolderURL in a collaboration api 2024-12-09 14:45:39 +01:00
Martin 21c584c2e8 Merge pull request #10447 from owncloud/collaboration_remove_lockname_config
feat: use only the app name in order to name the lock
2024-11-05 17:11:47 +01:00
Michael Barz dddc6fbdb5 fix: wopi lock header in get lock response 2024-11-05 15:35:43 +01:00
Juan Pablo Villafáñez 8d80b5ca25 fix: remove obsolete configuration option 2024-11-05 14:44:20 +01:00
Juan Pablo Villafáñez eb1736d099 feat: use only the app name in order to name the lock 2024-11-05 14:43:20 +01:00
Juan Pablo Villafáñez ff8d674666 fix: adjust tests for the new config option 2024-11-05 13:20:28 +01:00
Juan Pablo Villafáñez 32607b2481 refactor: change App.Provider to App.Product 2024-11-05 11:57:14 +01:00
Juan Pablo Villafáñez c822522b65 feat: include a provider option to allow custom app names 2024-11-05 11:57:14 +01:00
Michael Barz 406c8ca98d tests: add checks to unit tests 2024-10-24 22:57:21 +02:00
Michael Barz c4bd2f3987 fix: add missing urls to putRelative 2024-10-24 22:57:21 +02:00
Juan Pablo Villafáñez 924f77f044 fix: adjust unit tests 2024-10-24 08:46:54 +02:00
Juan Pablo Villafáñez b8f8ca813e feat: use short tokens as access tokens
The "real" access token will be stored using the short token as key.
This short token will be sent to the clients to be used as access token
for the WOPI server.

This is configurable, and requires a store in order to keep the tokens.
2024-10-24 08:46:54 +02:00
Jörn Friedrich Dreyer 6b97c74c40 require tls 1.2
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2024-10-22 10:56:04 +02:00
Michael Barz e40b7240bf feat: template feature
Signed-off-by: Michael Barz <mbarz@owncloud.com>
2024-10-17 08:47:02 +02:00
Michael Barz c384692d45 Merge pull request #10174 from owncloud/wopi-host-urls
feat: add wopi host and sharing urls
2024-09-30 10:02:40 +02:00
Michael Barz 00c9302d82 feat: add wopi host and sharing urls 2024-09-30 08:48:51 +02:00
Jörn Friedrich Dreyer 514062309b address code smells, refactor error handling
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2024-09-26 16:48:07 +02:00
Jörn Friedrich Dreyer cc56111194 extract newHttpRequest method
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2024-09-26 15:06:23 +02:00
Michael Barz 8cd9176e49 fix: always select next gateway client 2024-09-23 12:47:36 +02:00
Juan Pablo Villafáñez 153502189d fix: return 404 code if file isn't found on CheckFileInfo request 2024-09-19 10:51:28 +02:00
Michael Barz 903b513d9c fix: implement review 2024-08-30 16:27:36 +02:00
Michael Barz bfa3dd07bc feat: office 365 proxy support 2024-08-30 16:20:04 +02:00
Juan Pablo Villafáñez fe1712ebca fix: adjust unit tests 2024-08-21 13:43:04 +02:00
Juan Pablo Villafáñez 5ddd51ea84 refactor: simplify openInApp code and remove hostViewUrl (and edit) 2024-08-21 13:43:04 +02:00
Juan Pablo Villafáñez 9e7d570c79 fix: verify file id in URL matches the one inside the access token
We're using the file id from the access token, so changing the file id
in the URL shouldn't matter. However, the file id must represent a
single file.
It will also help to detect unwanted changes in the URL.
2024-08-13 15:04:19 +02:00
Juan Pablo Villafañez bb78b16079 Merge pull request #9771 from owncloud/collaboration_connector_refactor
Collaboration connector refactor
2024-08-13 11:37:56 +02:00
Juan Pablo Villafáñez 82a6a27d22 refactor: simplify ConnectorResponse creation 2024-08-09 13:33:23 +02:00