Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: Not able to create a super user #575

Closed
JenySadadia opened this issue Nov 26, 2024 · 0 comments · Fixed by #577
Closed

BUG: Not able to create a super user #575

JenySadadia opened this issue Nov 26, 2024 · 0 comments · Fixed by #577
Assignees
Labels
bug Something isn't working

Comments

@JenySadadia
Copy link
Collaborator

Observed a couple of issues while registering a super user with is_superuser=1 flag in the request dictionary.

Request command:

curl -X 'POST' 'http://localhost:8001/latest/user/register' -H 'accept: application/json'   -H 'Content-Type: application/json'  -H 'Authorization: Bearer TOKEN' -d '{"username": "test_admin", "email": "[email protected]", "password": "admin", "is_superuser": 1, "groups": ["kernelci"]}'

API logs:

kernelci-api          | User 674572be9c8d350bbb789ad7 test_admin has registered.
kernelci-api          | exception: update must either be a list or an instance of dict, bson.son.SON, or any other type that inherits from collections.Mapping
kernelci-api          | INFO:     172.18.0.1:41080 - "POST /latest/user/register HTTP/1.1" 500 Internal Server Error

This request generates a regular user account instead of a super user.

@JenySadadia JenySadadia added the bug Something isn't working label Nov 26, 2024
@JenySadadia JenySadadia self-assigned this Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant