Commit Graph

475 Commits

Author SHA1 Message Date
Jörn Friedrich Dreyer
ff9d11ad1a reuse go-micro service clients
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2024-11-15 17:18:39 +01:00
kobergj
0b26d45a9b Merge pull request #10510 from rhafer/issue/10488
fix(graph/ocm): Fix ocm share creation when user is in cache
2024-11-07 18:11:31 +01:00
Ralf Haferkamp
c463559ee7 fix(graph/ocm): Fix ocm share creation when user is in cache
Federated users are sharing the cache with regular users. So can't
we need to check the user type to determine if the user is federated.

Fixes #10488
2024-11-07 16:51:18 +01:00
Ralf Haferkamp
336d34821f fix(linter): Avoid copying protobuf messages
This shoud silence some linter warning about copying lock values.
2024-11-07 16:46:17 +01:00
Ralf Haferkamp
4792071d3d fix(graph): Use the correct opaqueId when Statting OCM shares
File shares need to use the base64 encoded path as the opaqueID, while
for folder shares the base64 encode '/' should work.

Fixes #10495
2024-11-07 16:41:04 +01:00
Michael Barz
eb4a18685a Merge pull request #10287 from 2403905/issue-10051-items
forbid adding the federated users as members of the space via items invite
2024-10-16 20:54:19 +02:00
jkoberg
c80254c4f1 feat(ocis): remove ocm store
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2024-10-15 17:24:51 +02:00
Roman Perekhod
3afc378ba9 forbid adding the federated users as members of the space via items invite 2024-10-14 19:56:52 +02:00
Jörn Friedrich Dreyer
9db7871f4c continue listing shares on error
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2024-10-04 15:44:10 +02:00
jkoberg
6e7bafb9e7 fix(graph): avoid panic when deleting ocm shares
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2024-10-02 11:24:56 +02:00
Jörn Friedrich Dreyer
ecad57aa63 Merge pull request #10172 from owncloud/fix-sharejail-stat-id
[full-ci] bump reva to 02af5a266
2024-09-30 14:49:06 +02:00
Jörn Friedrich Dreyer
0f525e9575 use actual resource id from stat for tagging
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2024-09-30 13:13:55 +02:00
Roman Perekhod
c6bbdaa23f We fixed the error code for ocm space sharing 2024-09-27 17:50:58 +02:00
Ralf Haferkamp
1d9182025d fix(graph): handle unknown remaining size in quota
In certain setups the storage is not able to report the remaining size of a space.
E.g. when no quota is set and the space is using the S3 blob storage drive. In this
case the graph API response will now not include the `remaining` properyt in the quota.

Fixes: #9245
2024-09-26 13:37:02 +02: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
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
Roman Perekhod
9792c45365 prevent adding the federated users as members of the space 2024-09-17 08:13:03 +02:00
Florian Schade
3a4c0f33ea fix: ocm share update 2024-09-11 15:34:08 +02:00
Florian Schade
7c34505f54 fix: use FromCS3Status error helper 2024-09-11 15:34:08 +02:00
Christian Richter
b0c23dce64 fix wrong error return
Signed-off-by: Christian Richter <crichter@owncloud.com>
2024-09-11 15:34:08 +02:00
Christian Richter
8ee17e7f27 fix invalid check
Signed-off-by: Christian Richter <crichter@owncloud.com>
2024-09-11 15:34:08 +02:00
Christian Richter
e9c6a0a3cd [WIP] Update OCM Shares
Co-authored-by: Jörn Friedrich Dreyer <jfd@butonic.de>
Signed-off-by: Christian Richter <crichter@owncloud.com>
2024-09-11 15:34:08 +02:00
Christian Richter
70a9ce6e74 allow deletion of federated shares
Signed-off-by: Christian Richter <crichter@owncloud.com>
2024-09-11 15:34:08 +02:00
Christian Richter
1242e483b3 improve error handling
Signed-off-by: Christian Richter <crichter@owncloud.com>
2024-09-11 15:34:08 +02:00
Florian Schade
4b09399ab9 chore: merge master 2024-08-27 18:22:13 +02:00
Florian Schade
2f9c6c86ea Merge branch 'master' into toggle-unified-roles 2024-08-27 17:43:05 +02:00
Jörn Friedrich Dreyer
6dc6fdacf4 list ocm shares in sharedByMe
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2024-08-27 12:39:37 +02:00
Jörn Friedrich Dreyer
18037f530e fix listing ocm properties
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2024-08-26 16:42:59 +02:00
Jörn Friedrich Dreyer
84e87cd722 set the configured protocol transport for service metadata
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2024-08-23 20:51:17 +02:00
Jörn Friedrich Dreyer
9177684ad4 Merge pull request #9905 from owncloud/list-ocm-permissions
List OCM permissions as graph drive item permissions
2024-08-23 14:41:40 +02:00
Jörn Friedrich Dreyer
6d465575f4 List OCM permissions as graph drive item permissions
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2024-08-23 11:36:45 +02:00
jkoberg
d335d635b3 feat(graph): add TRANSLATION_PATH envvar
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2024-08-23 11:08:29 +02:00
Florian Schade
43ba95190f enhancement: show permission actions if no role is set when converting space permissions to libregraph permissions 2024-08-21 16:50:34 +02:00
Florian Schade
e348ac290e enhancement: only use allowed roles for the graph service 2024-08-21 14:08:39 +02:00
Florian Schade
196c988b8c enhancement: add unified roles filters 2024-08-21 14:08:38 +02:00
Florian Schade
4638280d21 enhancement: add allowed role validation to the go-playground validator 2024-08-21 14:08:29 +02:00
Florian Schade
56537e94fc enhancement: do not enable all roles by default.
from now on, not all unified roles are enabled by default, instead the available roles are hand-picked in the default setup.

For advanced use-cases, the administrator is capable to enable the desired set of available roles.

Picking roles is not easy since the uid is NOT humanly readable, therefore a cli is contained which lists the available, disabled and enabled roles.
2024-08-21 14:08:27 +02:00
Ralf Haferkamp
8476da2f7b fix(graph): treat memberOf and userType as read-only attributes
Fixes: #9858
2024-08-20 17:58:20 +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
cfefec96b6 graph: add identities property to non-admin response of GetUsers
Fixes: #9813
2024-08-15 10:49:13 +02:00
Viktor Scharf
c33c180dbd Merge pull request #9788 from rhafer/filter-usertype
feat(graph): add support for filtering users by type
2024-08-14 10:11:25 +02:00
Jörn Friedrich Dreyer
ad62bb1817 Merge pull request #9765 from owncloud/federated-user-roles
allow querying federated sharing roles
2024-08-13 16:49:48 +02:00
Ralf Haferkamp
99df9bd3bb graph: allow regular users to filter users by userType 2024-08-13 14:40:12 +02:00
Ralf Haferkamp
23ba6e4755 feat(graph): add support for filtering users by type
This add support for equality filters on the `userType` property of users
for the /users endpoint.

It also changes the behavior of the /users endpoint to only return
federated users when explicitly request via a `userType` filter.

E.g. to search for federated users with matching "albert" you can use:

`$filter=userType eq 'Federated'&$search="albert"`

Related Issue: #9702
2024-08-13 14:16:16 +02:00
Ralf Haferkamp
80631bd941 graph: remove some code duplication 2024-08-13 14:16:16 +02:00
Ralf Haferkamp
5355b449c1 cleanup(graph): move ocm user search to separate function 2024-08-13 14:16:16 +02:00
Ralf Haferkamp
5ef865a402 graph: Add some test coverage for ocm enabled users endpoint 2024-08-12 12:16:16 +02:00
Jörn Friedrich Dreyer
966b4e1422 allow querying federated sharing roles
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2024-08-12 11:29:39 +02:00
jkoberg
58798a18ec feat(graph): adjust to l10n pkg
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2024-08-06 14:25:30 +02:00
Roman Perekhod
21c6dda4f8 refactored the translation funcrions interface 2024-08-06 14:25:30 +02:00