Commit Graph

421 Commits

Author SHA1 Message Date
Christian Richter fde6a4b67a [Experiment] Remove language object from GetUser
Co-authored-by: Florian Schade <fschade@owncloud.com>

Signed-off-by: Christian Richter <crichter@owncloud.com>
2023-11-15 13:36:35 +01:00
Christian Richter 15699f02b8 Incorporate requested changes
Co-authored-by: Julian Koberg <jkoberg@owncloud.com>
Co-authored-by: Ralf Haferkamp <rhaferkamp@owncloud.com>
Co-authored-by: Michael Barz <mbarz@owncloud.com>
Signed-off-by: Christian Richter <crichter@owncloud.com>
2023-11-15 13:22:51 +01:00
Christian Richter 5e02658873 Fix wrong variable
Signed-off-by: Christian Richter <crichter@owncloud.com>
Co-authored-by: Julian Koberg <jkoberg@owncloud.com>
Co-authored-by: Ralf Haferkamp <rhaferkamp@owncloud.com>
2023-11-15 11:23:24 +01:00
Christian Richter 1e34e43c10 Add language to PostUser, allow admin to read user values
Signed-off-by: Christian Richter <crichter@owncloud.com>
2023-11-15 11:23:24 +01:00
Christian Richter 407238efa5 incorporate requested changes
Signed-off-by: Christian Richter <crichter@owncloud.com>
2023-11-15 11:23:24 +01:00
Christian Richter c5d3b74cd4 filter out unallowed fields in changes
Signed-off-by: Christian Richter <crichter@owncloud.com>
2023-11-15 11:23:24 +01:00
Florian Schade e2e1d1da44 fix(graph users test): provide proto list value example on how to set language
Co-authored-by: Florian Schade <fschade@owncloud.com>
Signed-of-by: Christian Richter <crichter@owncloud.com>
2023-11-15 11:23:24 +01:00
Christian Richter 3e203fe751 add mocks for valueservice
Signed-off-by: Christian Richter <crichter@owncloud.com>
2023-11-15 11:23:24 +01:00
Christian Richter 174097214f Persist preferred language for user
Signed-off-by: Christian Richter <crichter@owncloud.com>
Co-authored-by: Julian Koberg <jkoberg@owncloud.com>
Co-authored-by: Michael Barz <mbarz@owncloud.com>
2023-11-15 11:23:24 +01:00
Christian Richter a3f037a53e refactor to api changes
Signed-off-by: Christian Richter <crichter@owncloud.com>
2023-11-15 11:23:24 +01:00
Christian Richter 388e9f266a restore deleted changes
Signed-off-by: Christian Richter <crichter@owncloud.com>
2023-11-15 11:23:24 +01:00
Christian Richter d96031b7d3 add preffered language
Signed-off-by: Christian Richter <crichter@owncloud.com>
2023-11-15 11:23:24 +01:00
jkoberg 3629babb7e use name instead id for map
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2023-11-13 11:00:05 +01:00
jkoberg 73f87a003c refactor settings/pkg/store/defaults
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2023-11-10 13:02:21 +01:00
Florian Schade 643158b67b enhancement: add sharedWithMe graph beta endpoint (#7633) 2023-11-08 20:02:58 +01:00
Ralf Haferkamp 94d2befc25 Make v1beta1/roleManagement/permissions/roleDefinitions/ beta
To align with the current spec.
2023-11-08 15:46:24 +01:00
Ralf Haferkamp e084e5a722 graph/sharebyme: Use cache for user and group lookups 2023-11-08 14:45:44 +01:00
Ralf Haferkamp c9df9f5f31 graph: Make user and group lookup cache re-usable
drives.go implemented a local user/group cache (ttl based) to speed up repeated
user and group lookups. This commit moves the implementation to the 'identity' module
to make it usable outside of drives.go.
2023-11-08 14:45:44 +01:00
Ralf Haferkamp 65daa93c1e Fix url path for getsharedbyme
it's 'drive' not 'drives'
2023-11-08 09:31:45 +01:00
Ralf Haferkamp d2cff38ab4 graph/sharedbyme: Add user and group names to permissions 2023-11-06 09:35:27 +01:00
Ralf Haferkamp 580a4e0d92 graph/sharedbyme: populate the permissions property
Set the exipration date, grantedToV2 and link attributes on the
permissions.

The displayName for users and groups isn't expanded yet (only the "id" is set)
Also, the "roles" attribute cannot be populated yet.
2023-11-06 09:35:27 +01:00
Ralf Haferkamp 454ec52955 graph/sharedbyme: Use existing method to initialize driveitem properties
getDriveItem does a Stat() call on the resource and sets the
corresponding DriveItem properties.
2023-11-06 09:35:27 +01:00
Ralf Haferkamp b0538559c2 graph: Populate 'ParentRef' in driveitems 2023-11-06 09:35:27 +01:00
Ralf Haferkamp f18775b1cb graph: Initial implementation of /me/drives/sharedByMe endpoint
This adds a still incomplete implementation of the new /me/drives/sharedByMe
endpoint. For now it only sets the driveItem Id property. The 'permissions' relation
is not supported yet.

This endpoint is added to the /v1beta1 route, to indicate that it is
still imcomplete and might require changes.
2023-11-06 09:35:27 +01:00
Ralf Haferkamp 86b061421e Disable debug log during test 2023-11-06 09:35:27 +01:00
Dominik Schmidt db32fb46f9 Audio Metadata (#7490)
* Add audio facet to search protobuf message

* Add audio metadata to search index

* Return audio facet from search if available

* Store audio metadata in arbitrary metadata

* Add audio facet to driveItems listings

* Make tests coding style more consistent

* Fix tests

* Add changelog

* Make valueToString code more defensive

* Log status code as well
2023-11-06 08:56:46 +01:00
jkoberg 6e510be180 return 423 on tag create when file is locked
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2023-10-26 16:07:50 +02:00
Roman Perekhod d185b7145f implement sharing roles (#7524)
Co-authored-by: Roman Perekhod <rperekhod@owncloud.com>
2023-10-24 15:01:11 +02:00
Ralf Haferkamp 4465c9385d graph/education: Fix issues reported by sonarcloud 2023-09-27 15:39:00 +02:00
Ralf Haferkamp a34d467285 graph/education: slightly improve error handling and logging
- Use var for common errors
- Add the addition error message to the Error() output of errorcode.Error
- in PatchEducationSchool() use errorcode.RenderError() to turn the errorcode
  in to the right HTTP Status (instead of return 500 always)
2023-09-27 15:39:00 +02:00
Jörn Friedrich Dreyer 8cbf261568 give graph driveItems some love (#7250)
* give graph driveItems some love

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

* extract parseIDParam()

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

* add GetDriveItem(Children) tests

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

---------

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2023-09-08 15:40:06 +02:00
jkoberg 0cd5ad6415 use service accounts for graph
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2023-08-31 12:11:43 +02:00
Daniel Swärd 49fc22d532 Add missing tracing references to multiple services. (#7110) 2023-08-23 15:17:17 +02:00
Daniël Franke 952ebe7d7d Pass context to event publishing.
To allow tracing propagation via events, we need to pass the context
to the `Publish` function of reva events. This adds the context
everywhere where events are published. If there was no context to pass,
we started a new one with `context.Background()`.
2023-08-11 12:01:19 +02:00
Daniel Swärd 6a5e21eff4 Replacing implicit grpc client initialization with explicit package local variables. 2023-07-31 12:57:59 +02:00
Daniël Franke 919404bafe Move graph service to service tracer.
This changes the graph service away from using global tracers,
which makes debugging tracing issues easier going forward.
2023-07-12 12:56:33 +02:00
Ralf Haferkamp 51bc49d5b5 graph: Add config knob to set a minimal grace period for schoolTermination
When setting a terminationDate on a School, it's possible to configure a grace
period now so that only terminationDate that are at least a certain time in the
future can be set.
We also now forbid to set a terminationDate in the past.
2023-07-12 08:48:19 +02:00
Ralf Haferkamp 0bc36f1cf5 graph: Turn PatchEducationSchool test into test table 2023-07-12 08:48:19 +02:00
Ralf Haferkamp 5304184bd6 graph: Add 'terminationDate' property to educationSchool
Schools can now have a terminationDate set. Schools can only be deleted if the
terminationDate is in the past. Schools without a terminationDate cannot be deleted.
2023-07-12 08:48:19 +02:00
Ralf Haferkamp c9a9fddef1 Consitently switch to stretchr/testify
We were using stretchr/testify and test-go/testify inconsitently and
sometimes mixed in the same tests. This can cause very strange issue,
e.g when using things like mock.MatchedBy().

This moves all our code to stretchr/testify, which seems to be far
more active and maintained then test-go/testify.
2023-06-29 13:44:49 +02:00
jkoberg ef68dce389 add more details for DELETE endpoints
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2023-06-22 14:06:21 +02:00
jkoberg 3fe5e2b011 add ids to graph access logs
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2023-06-22 11:04:00 +02:00
Christian Richter 9198dd9a67 Fix tests
Co-authored-by: Julian Koberg <jkoberg@owncloud.com>
Signed-off-by: Christian Richter <crichter@owncloud.com>
2023-06-16 11:56:03 +02:00
Christian Richter dd862cdf06 Add event for role changes
Co-authored-by: Julian Koberg <jkoberg@owncloud.com>
Signed-off-by: Christian Richter <crichter@owncloud.com>
2023-06-16 10:52:37 +02:00
Christian Richter c4f9f18a39 Show changes between old an new values in audit log
Co-authored-by: Julian Koberg <jkoberg@owncloud.com>
Signed-off-by: Christian Richter <crichter@owncloud.com>
2023-06-16 10:52:37 +02:00
Roman Perekhod 4f9a82ee99 Merge pull request #6469 from 2403905/issue-6414
Handle the bad request status for the CreateStorageSpace function
2023-06-14 16:47:11 +03:00
Michael Barz 0484a4dac5 add remote item metadata
Signed-off-by: Michael Barz <mbarz@owncloud.com>
2023-06-14 11:20:47 +02:00
Roman Perekhod e73e760827 changlog added 2023-06-12 09:19:54 +02:00
Roman Perekhod df5641f406 cleared up the errors rendering 2023-06-12 09:19:54 +02:00
Roman Perekhod 6b3c1327d0 fixed the ability to create a group with an empty name #5050 2023-06-12 09:19:54 +02:00