Commit Graph

572 Commits

Author SHA1 Message Date
Pascal Bleser
0c4540bb4d Refactor groupware service after ADR decision on the Groupware API
* after having decided that the Groupware API should be a standalone
   independent custom REST API that is using JMAP data models as much as
   possible,
 * removed Groupware APIs from the Graph service
 * moved Groupware implementation to the Groupware service, and
   refactored a few things accordingly
2026-06-03 18:39:07 +02:00
Pascal Bleser
90a36d6797 Groupware and jmap: cleanup and API documentation 2026-06-03 18:39:07 +02:00
Pascal Bleser
7bbf9a4053 groupware: remove unneeded messages.go that was a remainder from an earlier implementation attempt, which also fixes compilation issues due to changes in main 2026-06-03 18:39:07 +02:00
Pascal Bleser
4379fa27e4 Groupware improvements: refactoring, k6 tests
* refactored the models to be strongly typed with structs and mapstruct
   to decompose the dynamic parts of the JMAP payloads

 * externalized large JSON strings for tests into .json files under
   testdata/

 * added a couple of fantasy Graph groupware APIs to explore further
   options

 * added k6 scripts to test those graph/me/messages APIs, with a setup
   program to set up users in LDAP, fill their IMAP inbox, activate them
   in Stalwart, cleaning things up, etc...
2026-06-03 18:39:07 +02:00
Pascal Bleser
7e7a78f76b groupware: removed debugging logs 2026-06-03 18:39:07 +02:00
Pascal Bleser
e1bd777ed0 groupware and jmap improvements and refactoring 2026-06-03 18:39:07 +02:00
Pascal Bleser
fda5c95b85 move services/groupware/pkg/jmap to pkg/jmap 2026-06-03 18:39:07 +02:00
Pascal Bleser
3d1c0ccc85 WIP: restructure the Jmap client, and implement the /me/messages Graph API endpoint with it 2026-06-03 18:39:07 +02:00
Christian Richter
0351adfe6b change logger level
Signed-off-by: Christian Richter <c.richter@opencloud.eu>
2026-05-20 14:14:00 +02:00
Ralf Haferkamp
f056326c4c Merge remote-tracking branch 'origin/main' into feature/guest-links 2026-05-13 14:35:54 +02:00
Jörn Friedrich Dreyer
5d7bfc9033 delete unused constants
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2026-05-13 10:54:00 +02:00
Dominik Schmidt
a75d89d1b0 feat(graph): populate driveItem.webUrl per Libre Graph spec
The Libre Graph spec declares webUrl on driveItem but
cs3ResourceToDriveItem never set it. Build the /f/<resource-id>
permalink off the configured public base URL (same source drives.go
reads for drive.webUrl) and parse it once at service construction
so callers can use it as a plain field.
2026-05-12 15:28:10 +02:00
Ralf Haferkamp
173485cf44 Merge remote-tracking branch 'origin/main' into feature/guest-links 2026-04-29 10:24:57 +02:00
André Duffeck
e9e195789d Adapt to changes in reva/cs3apis 2026-04-24 14:49:11 +02:00
Ralf Haferkamp
ec8733ac52 graph: use share manager for managing space permissions
This gets us rid of quite a bit of special casing for space permission.
Also provides us with "real" permission IDs instead of those faked
"u:<userid>" ones.
2026-04-23 17:07:00 +02:00
Ralf Haferkamp
fad0cc4828 Use filter to avoid including space membership in the sharedWithMe response 2026-04-23 17:07:00 +02:00
Florian Schade
288e67cc39 chore: replace interface with any 2026-04-23 09:31:11 +02:00
Ralf Haferkamp
e2f322791a fix(graph): sort drive in "natural" order
Instead of doing a lexical sort we sort the drive/space in a more
"natural" order so that e.g. "Space 2" is sorted before "Space 10".

Related: https://github.com/opencloud-eu/web/issues/2430
2026-04-23 08:44:13 +02:00
André Duffeck
bfba4ec671 Render the followed drive item after following it according to the spec 2026-03-13 09:38:28 +01:00
André Duffeck
58db915775 Emit events when favorites are added/removed 2026-03-13 09:38:28 +01:00
André Duffeck
3402390b69 Add endpoints for following/unfollowing drive items to the graph API 2026-03-13 09:38:28 +01:00
Ralf Haferkamp
9f7b42586b chore(graph/education): reduce complexity and duplication 2026-03-04 15:14:30 +01:00
Ralf Haferkamp
020a37b017 feat(graph): replace externalId school lookup with OData $filter support
Remove the ability to look up schools by externalId directly (from LDAP
filters, duplicate checks, and the EducationBackend interface). This
approach was somewhat unclean, we shouldn't add more an more attributes
as keys for direct lookup.

Instead, expose externalId filtering via the OData $filter query
parameter on GET /education/schools, following the same pattern as
for education users.

Related: #1598
2026-03-04 14:31:43 +01:00
Ralf Haferkamp
6f404096ce feat(graph/education): Add support of 'eq' filters on users
This adds support of simple OData filters on the 'education/users'
endpoint. Filters of the type '$filter=<attr> eq <value>' are supported
now for the following educationUser properties:

"displayname", "mail", "userType", "primaryRole" and "externalId"

Closes: #1599
2026-03-04 13:51:42 +01:00
Ralf Haferkamp
6082e0c4df fix: Show username in unprivileged search results (#2104)
* fix: Show username in unprivileged search results

`onPremisesSamAccountName` is a mandatory attribute according to the
spec. There's no harm in returning it in the search results also for
unprivileged users.

Fixes: #144

* adapt tests

* adapt tests

* adapt tests

---------

Co-authored-by: Viktor Scharf <v.scharf@opencloud.eu>
2026-01-07 12:43:27 +01:00
Viktor Scharf
2bdd98f5cf [full-ci] revaBump-v2.40.1 (#1927)
* revaBump-v2.40.0

* adapt tests

* bring-#442

* adapt tests

* bring-#444

* ocm fixes

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* adapt tests

* adapt unit tests

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* revaUpdate-2.40.1

* update opencloud-version-4.0.0-rc.3

---------

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
Co-authored-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2025-11-28 17:34:12 +01:00
Christian Richter
bb797e3727 fix related tests
Signed-off-by: Christian Richter <c.richter@opencloud.eu>
2025-11-13 09:45:49 +01:00
Christian Richter
28fdfded71 incorporate requested changes
Signed-off-by: Christian Richter <c.richter@opencloud.eu>
2025-11-12 17:50:28 +01:00
Christian Richter
a044d87f10 fix related tests
Signed-off-by: Christian Richter <c.richter@opencloud.eu>
2025-11-07 08:26:09 +01:00
Christian Richter
e112ac7721 move idendity cache to subpackage
Signed-off-by: Christian Richter <c.richter@opencloud.eu>
2025-11-06 18:01:58 +01:00
Christian Richter
1404c69597 change function headers & calls
Signed-off-by: Christian Richter <c.richter@opencloud.eu>
2025-11-06 18:01:58 +01:00
Ralf Haferkamp
e2441696c2 graph(education): 'primaryRole' and 'identities' should be optional
Related: #1597
2025-10-28 12:56:42 +01:00
Ralf Haferkamp
28ec9c3282 graph(education): Make 'schoolNumber' attribute optional
It's already optional in the spec. For mulit-tenant provisioning
we want it to be optional as well.

Related: #1597
2025-10-28 12:56:42 +01:00
fschade
c0244fc977 enhancement(graph): resolve review feedback such as, use fmt for error wrapping, make use of store auth options, use a dedicated jetstream package 2025-10-08 16:45:16 +02:00
Christian Richter
351f4e6be2 Mock nats & adapt tests
Co-authored-by: Florian Schade <f.schade@opencloud.eu>

Signed-off-by: Christian Richter <c.richter@opencloud.eu>
2025-10-08 16:45:16 +02:00
Christian Richter
5225b66f65 Move keyvalue initialisation to options
Co-authored-by: Florian Schade <f.schade@opencloud.eu>

Signed-off-by: Christian Richter <c.richter@opencloud.eu>
2025-10-08 16:45:16 +02:00
Christian Richter
098ed082c8 attempt to fix broken soft delete
Signed-off-by: Christian Richter <c.richter@opencloud.eu>
2025-10-08 16:45:16 +02:00
Christian Richter
813edc4a59 use standard errors package
Signed-off-by: Christian Richter <c.richter@opencloud.eu>
2025-10-08 16:45:16 +02:00
Christian Richter
f7454e576a remove obsolete properties
Signed-off-by: Christian Richter <c.richter@opencloud.eu>
2025-10-08 16:45:16 +02:00
Christian Richter
ef920b040a add missing pointer
Signed-off-by: Christian Richter <c.richter@opencloud.eu>
2025-10-08 16:45:16 +02:00
Christian Richter
b815a6e0a1 respect ldap settings, add comments
Signed-off-by: Christian Richter <c.richter@opencloud.eu>
2025-10-08 16:45:16 +02:00
Christian Richter
cd295dfd9e add persistance function & userstate
Signed-off-by: Christian Richter <c.richter@opencloud.eu>
2025-10-08 16:45:16 +02:00
Christian Richter
07a9308c4c add nats-js-kv connection to graph
Signed-off-by: Christian Richter <c.richter@opencloud.eu>

# Conflicts:
#	services/graph/pkg/service/v0/service.go
2025-10-08 16:45:16 +02:00
Ralf Haferkamp
a5e0c1ec4b fix(graph): Set the full CS3 user id in the Create Share request
Up to now we only set the OpaqueId attribute, which breaks sharing as soon as
multi-tenancy is enabled. We need the full UserId (including the
tenantId and the idp value).

Related Issue: #1194
2025-09-09 15:10:28 +02:00
Ralf Haferkamp
ab6c39e381 feat(tracing): Enable tracing for the graph service
The graph service uses the `otelchi` middleware now to get at least some
basic tracing enabled.
2025-09-02 17:02:11 +02:00
Christian Richter
19141c2b71 add user soft delete
Signed-off-by: Christian Richter <c.richter@opencloud.eu>
2025-08-27 10:36:12 +02:00
André Duffeck
4c2b723ab0 Implement $expand=thumbnails for sharedwithme 2025-07-22 10:43:00 +02:00
André Duffeck
a6cdbc710d Fix thumbnail URLs for sharedbyme 2025-07-22 10:42:22 +02:00
Christian Richter
49ab88e980 Add signed-url handling to thumbnail service
Co-authored-by: André Duffeck <a.duffeck@opencloud.eu>

Signed-off-by: Christian Richter <c.richter@opencloud.eu>
2025-07-22 08:51:16 +02:00
Christian Richter
74ba68ffd1 fix typo for trashbin
Signed-off-by: Christian Richter <c.richter@opencloud.eu>
2025-07-07 15:50:58 +02:00