Skip to content

Conversation

JenySadadia
Copy link
Collaborator

implement DELETE /group/<group-id> endpoint to delete a user group.
Remove users from that group before deleting it. Also, check if the group is assigned to any node and remove it from user groups that are permitted to update the node.

Implement a method to delete one object matching
a given ID.

Signed-off-by: Jeny Sadadia <jeny.sadadia@collabora.com>
Implement endpoint to delete a user group. Remove users
from that group before deleting it. Also, remove group
name from permitted groups `Node.user_groups` to update
node.

Signed-off-by: Jeny Sadadia <jeny.sadadia@collabora.com>
@JenySadadia JenySadadia marked this pull request as ready for review November 30, 2023 07:27
@JenySadadia
Copy link
Collaborator Author

In order to use db.find_by_attributes, I needed to add response_model=PageModel to the endpoint event if the endpoint is not returning anything.
This is because the DB function is using paginate method from fastapi-pagination and I need to mention pagination model in the response_model as per the package requirements.
The new version of fastapi-pagination has fixed the issue. I'll create a GH issue to upgrade the package version.

Copy link
Collaborator

@gctucker gctucker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK following the merge-and-fix approach to untangle the various pending PRs and conflicts with kernelci-core related changes.

@gctucker gctucker added this pull request to the merge queue Dec 5, 2023
Merged via the queue into kernelci:main with commit 89f73d8 Dec 5, 2023
@JenySadadia JenySadadia deleted the del-user-group branch December 5, 2023 09:55
@JenySadadia JenySadadia linked an issue Dec 7, 2023 that may be closed by this pull request
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

User account management

2 participants