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

Update query with created state #1233

Merged
merged 3 commits into from
May 17, 2023
Merged

Update query with created state #1233

merged 3 commits into from
May 17, 2023

Conversation

muralibasani
Copy link
Contributor

About this change - What it does

When a user is deleted, look for existing requests with only created state

Resolves: #1219
Why this way
Helps in removing stale data like inactive users

Signed-off-by: muralibasani <muralidahr.basani@aiven.io>
@muralibasani muralibasani requested a review from a team as a code owner May 15, 2023 13:56
Signed-off-by: muralibasani <muralidahr.basani@aiven.io>
Copy link
Contributor

@aindriu-aiven aindriu-aiven left a comment

Choose a reason for hiding this comment

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

Same comment on all the requests.
Not sure we need to worry if they are an approver?

@@ -29,7 +29,7 @@ List<Object[]> findAllRecordsCountForTeamId(

@Query(
value =
"select count(*) from kwaclrequests where (requestor = :userId or approver = :userId) and tenantid = :tenantId",
"select count(*) from kwaclrequests where (requestor = :userId or approver = :userId) and tenantid = :tenantId and topicstatus='created'",
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need to worry about them being an approver? Maybe if they were the only approver but Im not sure we do need to worry about that?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

i think we should ignore them too, so its their responsibility to setup approvers

Signed-off-by: muralibasani <muralidahr.basani@aiven.io>
@muralibasani muralibasani merged commit d2bc3bc into main May 17, 2023
@muralibasani muralibasani deleted the user-deletion branch May 17, 2023 07:56
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.

Delete user functionality
2 participants