Commit Graph

33 Commits

Author SHA1 Message Date
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
3dc9c0cb9a Switch to opencloud-eu fork of libre-graph-api-go 2025-05-15 14:11:35 +02: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
Ralf Haferkamp
6f90abd22d fix(ocm): Adjust for recend change for federated user IDs
The UserIds as returned by e.g. GetAcceptedUser do already contain
the provider domain in the IDP field now.

Also adjust the provider domain in the OCM config to be really a domain
without URI scheme and path.
2024-11-14 15:51:07 +01:00
Ralf Haferkamp
34cc7b2e56 feat(graph): Add $filter support for lastSuccessfulSignInDateTime
It is now possible to filter users based on the lastSuccessfulSignInDateTime attribute
using query filter like:
 '$filter=signInActivity/lastSuccessfulSignInDateTime le 2021-09-01T00:00:00Z'

Note: This does only work with LDAP servers actually supporting '<=' filters.
The built-in LDAP server (idm) does not support this feature.
2024-09-23 10:49:49 +02:00
Ralf Haferkamp
0bd4b90d7f fix: Make linter happy 2024-09-17 16:02:47 +02:00
Ralf Haferkamp
8e158d52bb graph(oidc): Consume UserSignedIn events in graph service
Pass them to the identity backend to update the last sign-in date of the user.
2024-09-17 16:02:47 +02:00
Jörn Friedrich Dreyer
5ab53b2474 bump reva to 9878984ce702
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2024-09-05 15:03:05 +02:00
Jörn Friedrich Dreyer
a3c7bd3182 bump libre graph api
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2024-08-19 14:20:20 +02:00
Ralf Haferkamp
80e8a2ec1a (fix)graph: Always set UserType in /users responses
LDAP users without a UserType attribute get the UserType "Member"
by default. Federated users get the UserType "Federated".

Related #9702
2024-08-12 12:16:16 +02:00
Jörn Friedrich Dreyer
ab338884c6 rudimentary OCM support in graph
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2024-06-24 12:07:21 +02:00
Thomas Müller
07f0cd5574 fix: typos, naming clashes, error messages and deprecations 2024-04-03 15:34:36 +02:00
Ralf Haferkamp
a1ed2ce2e5 graph/groups: Handle quoted search terms in GetGroups
Fixes: #7990
2023-12-21 13:57:26 +01:00
Florian Schade
ad06a192d8 enhancement: add graph beta listPermissions endpoint (#7753)
* enhancement: add graph beta listPermissions endpoint

besides the new api endpoint it includes several utilities to simplify the graph api development.

* resolve drive and item id from the request path
* generic pointer and value utilities
* space root detection

* update GetDriveAndItemIDParam signature to return a error

* move errorcode package

* enhancement: add generic error code handling

* fix: rebase
2023-11-28 17:06:04 +01:00
Ralf Haferkamp
f2599dfa76 graph: Make createGroupModelFromCS3() function public
This is useful outside the identity module so make it available
2023-11-08 14:45:44 +01:00
Daniel Swärd
ab07525602 graph: Allow updating of group name via PATCH request 2023-03-28 13:06:53 +02:00
Ralf Haferkamp
b7ec7c92c4 graph: Initial support for $filter in /users (#5533)
This adds some initial support for using $filter (as defined in the
odata spec) on the /users endpoint. Currently the following filters are
supported:

A single filter on `id` property of the `memberOf` relation of users.
To list all users that are members of a specific group:

```
curl 'https://localhost:9200/graph/v1.0/users?$filter=memberOf/any(m:m/id eq '262982c1-2362-4afa-bfdf-8cbfef64a06e')
```

A logical AND filteri on the `id` property of the `memberOf` relation of users.

`$filter=memberOf/any(m:m/id eq 262982c1-2362-4afa-bfdf-8cbfef64a06e) and memberOf/any(m:m/id eq 6040aa17-9c64-4fef-9bd0-77234d71bad0)`

This will cause at least two queries on the identity backend. The `and`
operation is performed locally.

Closes: #5487
2023-02-14 10:32:32 +01:00
Daniel Swärd
2338515444 Make ldap functions package local and remove a superfluous comment. 2023-02-10 15:12:19 +01:00
Daniel Swärd
4c1325f02a Remove duplication and make method generic. 2023-02-09 11:56:10 +01:00
Daniel Swärd
399e05b256 Remove code duplication for ldap entry membership. 2023-02-09 11:38:50 +01:00
Daniel Swärd
8e1a65fc29 graph: Add support for listing/adding/removing teachers to a class 2023-02-08 16:55:10 +01:00
Ralf Haferkamp
26f7523ff8 graph: Pass parsed odata request to the identity backend
In preparation for some more advanced queries pass the parse odata request
tVo the identity backend methods instead of the raw url.Values{}. This also
add some helpers for validating $expand and $search queries to reject
some unsupported queries.

Also remove support for `$select=memberOf` and `$select=drive|drives` queries
and stick to the technically correct `$expand=...`.
2023-02-08 14:25:55 +01:00
Ralf Haferkamp
25d2a2bc71 graph: Remove some uneeded stuff for the education backend
We don't need to support any complex queries on /education (yet?). And if we would need
to add support for $search, $filter, $expand or $select we should pass the parsed odata Query
instead of the raw url.Values struct.
2023-02-08 14:25:55 +01:00
Daniël Franke
20f6a212f3 Add service endpoints. 2023-01-31 12:52:49 +01:00
Daniël Franke
2ca35f0a2b Allow patching of EducationClass properties.
As described in #5410: add support for updating educationClass properties.
This adds the `UpdateEducationClass` to the `EducationBackend` interface,
and implements it on the `ErrEducationBackend` and `LDAP` backends.

It also alters `PatchEducationClass` to call the `UpdateEducationClass` method.

Closes #5410
2023-01-23 14:38:12 +01:00
Ralf Haferkamp
709ef1ffca graph:Add stubs for education/classes endpoints (#5360)
* Renamed files for consistency reasons

err_school.go implements the full education interface not just schools.
ldap_school.go renamed to ldap_education_school.go for making it
consistent with ldap_education_user.go

* graph: Add stubs for education/classes endpoints

The acutal backend implementations are still empty.
2023-01-11 20:38:18 +01:00
Daniel Swärd
e15b3cd8cc Adding so education PATCH updates school name or number. 2023-01-11 12:14:54 +01:00
Daniël Franke
aff568d0b8 Make identity errors public. (#5353)
This makes the identity errors public so other packages can match on them.

It also moves them to the same file as the interface, as that makes them more discoverable.
2023-01-06 12:04:38 +01:00
Ralf Haferkamp
5095b35822 Fix naming of school membership endpoints
It's /education/school/{id}/users not members
2022-12-22 17:03:37 +01:00
Jörn Friedrich Dreyer
cd23d010a4 correct naming of education backend methods
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2022-12-21 15:38:14 +01:00
Jörn Friedrich Dreyer
57fd00d238 handle /education/user
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2022-12-21 15:38:14 +01:00
Jörn Friedrich Dreyer
9844f5f8ce initial schools API
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2022-12-21 15:38:14 +01:00
Christian Richter
78064e6bab rename folder extensions -> services
Signed-off-by: Christian Richter <crichter@owncloud.com>
2022-06-27 14:05:36 +02:00