ls1intum / Artemis

Artemis - Interactive Learning with Automated Feedback
https://docs.artemis.cit.tum.de
MIT License
486 stars 288 forks source link

Deletion of inactive users does not work if too many users are inactive #9364

Open dfuchss opened 2 hours ago

dfuchss commented 2 hours ago

Describe the bug

In #9224 we got the nice feature of deleting inactive users. Nevertheless, this request fails if you want to delete many users (e.g. > 1000).

Http failure response for https://artemis/api/admin/users?login=xyz&login=.....: 400 OK

It's probably because the request is encoded as parameters in the url.

To Reproduce

See above

Expected behavior

Inactive users shall be deleted

Screenshots

No response

Which version of Artemis are you seeing the problem on?

7.5.3

What browsers are you seeing the problem on?

Firefox

Additional context

No response

Relevant log output

No response

b-fein commented 2 hours ago

/cc @BaumiCoder

If the cause is the parameter list, I think a simple fix would then be to create a small DTO like

record InactiveUserLogins(logins: List<String>) {}

and send that as POST body rather than via parameters.

dfuchss commented 2 hours ago

It's not super urgent because I've now used a script for that. But maybe it's important for others as well :)

-> https://github.com/kit-sdq/artemis4j/commit/34b1cb93febb4bdbea3c13f62cbfcef884b79a6b