Commit Graph

125 Commits

Author SHA1 Message Date
Daniel Swärd e15b3cd8cc Adding so education PATCH updates school name or number. 2023-01-11 12:14:54 +01:00
Florian Schade 95023f2adc mute newService err in tests (#5372) 2023-01-10 17:11:30 +01:00
Florian Schade bb1540fc45 [full-ci] add identitySet displayName property to the group and user sets (#5347)
* add identitySet displayName property to the group and user sets
2023-01-10 15:42:13 +01:00
Daniël Franke 43a98c0485 Add test for new configurable patch limit.
Also make test for old default match on the actual error message.
2023-01-10 11:45:24 +01:00
Daniël Franke 425ebb8084 Change naming 2023-01-10 11:45:24 +01:00
Daniël Franke 49d71ea111 Make amount of users in patch configurable.
This PR changes the following:

* Create an API config section for API configurables.
* Add a setting `UserPatchLimit` that controls how many users can be changed in a PATCH request.
* Use this setting in the API to limit the amount of users that can be changed.
2023-01-10 11:45:24 +01:00
Ralf Haferkamp 4717248959 Simplify sort code a bit
Switch to sort.Slice() instead of sort.Sort(), which requires less
boilerplate.
2023-01-10 09:31:40 +01:00
Daniël Franke f3924ca8c2 Disassociate users from schools on school delete. (#5343)
* Disassociate users from schools on school delete.

This PR alters the `DeleteEducationSchool` to also disassociate the
users that were associated with the to-be-deleted school.

* Add changelog.

* Remove punctuation from changelog.

* Remove redundant return statement.

* Skip when user not find.
2023-01-06 12:58:32 +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
Daniel Swärd a0e85386a4 Fixing linting error. 2023-01-05 11:42:39 +01:00
Daniel Swärd 80b8ce42f6 Update GetEducationSchoolUsers, AddUsersToEducationSchool, RemoveUserFromEducationSchool with schoolNumber. 2023-01-05 11:42:39 +01:00
Daniel Swärd e0c6aa5c34 Modify DeleteEducationSchool for schoolNumber/id and remove old test 2023-01-05 11:42:39 +01:00
Daniel Swärd 3daf2c50b8 Modify GetEducationSchool to accept schoolNumber as well as id 2023-01-05 11:42:39 +01:00
Florian Schade 21797fb22d [full-ci] Bump libre-graph-api-go and drive group permissions (#5312)
* Bump libre-graph-api-go
Expose drive group permissions

Co-authored-by: kobergj <jkoberg@owncloud.com>
2022-12-30 17:23:56 +01:00
jkoberg 482e4a26c9 fix graph unit tests
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2022-12-29 11:06:53 +01:00
Florian Schade 8db120c39a bump libre-graph-go 2022-12-29 10:30:22 +01:00
jkoberg 837eff9017 adjust for tags pkg
Signed-off-by: jkoberg <jkoberg@owncloud.com>

tmp

Signed-off-by: jkoberg <jkoberg@owncloud.com>
2022-12-23 10:55:57 +01:00
Ralf Haferkamp f1e0230664 Fix linter issue 2022-12-22 17:03:37 +01:00
Ralf Haferkamp 255d42eb05 Add support for listing users assigned to a school 2022-12-22 17:03:37 +01:00
Ralf Haferkamp 77ea95535e Add support for removing users from schools 2022-12-22 17:03:37 +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
Ralf Haferkamp 336f128e71 Add support for assigning education users to schools 2022-12-22 17:03:37 +01:00
Ralf Haferkamp 80a2c72491 graph: Initial LDAP support for /education/users
This implements GetEducationUser, GetEducationUsers, DeleteEducationUser and
CreateEducationUser methods for the LDAP backend. It's still very basic and
no fancy filtering or expanding is there yet.
2022-12-22 17:03:37 +01:00
Ralf Haferkamp b42bf80d0e graph: Rename noop backend to ErrEducationBackend 2022-12-21 15:38:14 +01:00
Jörn Friedrich Dreyer c3c851286f fix comment
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2022-12-21 15:38:14 +01:00
Jörn Friedrich Dreyer 3637149eeb fix gateway client mock
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2022-12-21 15:38:14 +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 8967556b9d correct EducationSchool naming
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2022-12-21 15:38:14 +01:00
Jörn Friedrich Dreyer 5a1d3ebe82 config and logging fixes
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2022-12-21 15:38:14 +01:00
Jörn Friedrich Dreyer 8babace4b6 add comments for linter
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
Ralf Haferkamp 962ae09bf1 LDAP support for GetSchools 2022-12-21 15:38:14 +01:00
Ralf Haferkamp 644d96e7ad LDAP support for GetSchool 2022-12-21 15:38:14 +01:00
Ralf Haferkamp bc9f81cc23 LDAP Support for Delete School 2022-12-21 15:38:14 +01:00
Ralf Haferkamp ad1355d032 Implement LDAP backend for CreateSchool 2022-12-21 15:38:14 +01:00
Ralf Haferkamp b302af88f6 Add basic config setting for LDAP education backend
require LDAP support for Education resources to be explicitly enabled.
Default to a NOOP implementation if disabled.
2022-12-21 15:38:14 +01:00
Ralf Haferkamp 795bc70546 Add a more explict filter to DN based lookups
To make sure to read the right type of object
2022-12-21 15:38:14 +01:00
Jörn Friedrich Dreyer e1123576f3 disable school events
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
David Christofas 39917330f6 fix goconst bugs 2022-12-21 14:46:01 +01:00
jkoberg b29ffeb3a9 use stream pkg instead server pkg
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2022-12-20 09:53:11 +01:00
Florian Schade 1db03dd512 [full-ci] experimental tags backport (#5227)
* add tags to search service resource
add tags getTags, AssignTags and UnassignTags endpoint to graph
use and prefer search event spaceOwner over executant
add tags to search report response
update libre graph api
update reva

Co-authored-by: David Christofas <dchristofas@owncloud.com>
2022-12-19 15:44:02 +01:00
Jörn Friedrich Dreyer d359a7c2cf [full-ci] standalone graph service with LDAP (#5199)
* standalone graph service with LDAP

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

* no panic on PATCH and DELETE

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

* fix apitoken yaml key

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

* update user, fix response codes

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

* fix group creation return code

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

* remove unknown user property

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

* fix create return code checks in graph feature context

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

* updating uses 200 OK when returning a body

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

* revert user statusCreated change for now

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

* revert return code changes

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

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2022-12-12 12:46:10 +01:00
Jörn Friedrich Dreyer b2b4f9893c align revactx package import (#5206)
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2022-12-08 14:45:30 +01:00
Jörn Friedrich Dreyer 53d15d329e remove deprecated use of ioutil (#5205)
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2022-12-08 14:44:53 +01:00
Martin ae940758d6 Merge pull request #5167 from owncloud/graph-readme
add a README to the graph package
2022-12-05 11:44:58 +01:00
David Christofas dc53b39f23 add a README to the graph package 2022-12-05 11:11:25 +01:00
André Duffeck d1958a0802 Increase test coverage 2022-12-01 08:50:53 +01:00
André Duffeck e87eff95e6 Make method which is only used internally private 2022-12-01 08:25:19 +01:00
André Duffeck bc9a05aef4 Add GetRootDriveChildren to the service interface 2022-12-01 08:25:19 +01:00