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

[Feature] Allow admins to delete users from db #1735

Merged
merged 5 commits into from
Mar 14, 2024

Conversation

Freedisch
Copy link
Contributor

Description

This PR fixes issue #931
This PR introduces a new delete button to users on user management page, allowing admin to delete users

Demo

Screen.Recording.2024-03-11.at.20.03.28.mov

@Freedisch Freedisch requested a review from a team as a code owner March 11, 2024 18:06
Copy link

Build failed. More information on how to proceed and troubleshoot errors available at https://fedoraproject.org/wiki/Zuul-based-ci
https://fedora.softwarefactory-project.io/zuul/buildset/e75660acdecf4e61af0991b8b8fcd8b0

✔️ fi-tox-mypy SUCCESS in 5m 40s
✔️ fi-tox-lint SUCCESS in 6m 52s
✔️ fi-tox-format SUCCESS in 5m 49s
✔️ fi-tox-python38 SUCCESS in 10m 50s
✔️ fi-tox-python39 SUCCESS in 9m 37s
✔️ fi-tox-python310 SUCCESS in 10m 49s
✔️ fi-tox-python311 SUCCESS in 9m 51s
fi-tox-docs FAILURE in 7m 46s
✔️ fi-tox-bandit SUCCESS in 4m 53s
fi-tox-diff-cover FAILURE in 10m 42s

@Freedisch
Copy link
Contributor Author

I'm taking care of the failing CI

@Zlopez
Copy link
Contributor

Zlopez commented Mar 12, 2024

I will wait till CI will be fixed, but the PR looks good 👍

Copy link

Merge Failed.

This change or one of its cross-repo dependencies was unable to be automatically merged with the current state of its repository. Please rebase the change and upload a new patchset.
Warning:
Error merging github.com/fedora-infra/anitya for 1735,b6a16e96207a257f977a8de82141dd1347a58fc1

Copy link

Build failed. More information on how to proceed and troubleshoot errors available at https://fedoraproject.org/wiki/Zuul-based-ci
https://fedora.softwarefactory-project.io/zuul/buildset/bdd1448fd1e2484fa024dcf3356223ba

✔️ fi-tox-mypy SUCCESS in 7m 14s
✔️ fi-tox-lint SUCCESS in 6m 32s
✔️ fi-tox-format SUCCESS in 6m 31s
✔️ fi-tox-python38 SUCCESS in 11m 03s
✔️ fi-tox-python39 SUCCESS in 9m 41s
✔️ fi-tox-python310 SUCCESS in 10m 47s
✔️ fi-tox-python311 SUCCESS in 10m 34s
✔️ fi-tox-docs SUCCESS in 7m 55s
✔️ fi-tox-bandit SUCCESS in 5m 22s
fi-tox-diff-cover FAILURE in 11m 38s

Copy link

Build failed. More information on how to proceed and troubleshoot errors available at https://fedoraproject.org/wiki/Zuul-based-ci
https://fedora.softwarefactory-project.io/zuul/buildset/a451d100ef8a432d8a6c2c48d57f3f0e

✔️ fi-tox-mypy SUCCESS in 7m 33s
✔️ fi-tox-lint SUCCESS in 5m 01s
✔️ fi-tox-format SUCCESS in 5m 54s
fi-tox-python38 FAILURE in 9m 12s
fi-tox-python39 FAILURE in 10m 15s
fi-tox-python310 FAILURE in 11m 35s
fi-tox-python311 FAILURE in 9m 15s
✔️ fi-tox-docs SUCCESS in 7m 26s
✔️ fi-tox-bandit SUCCESS in 6m 53s
fi-tox-diff-cover FAILURE in 10m 15s

Copy link

Build succeeded.
https://fedora.softwarefactory-project.io/zuul/buildset/5c4ebbd575ad4849a7aa6c37c7c1a1e5

✔️ fi-tox-mypy SUCCESS in 6m 53s
✔️ fi-tox-lint SUCCESS in 6m 26s
✔️ fi-tox-format SUCCESS in 4m 43s
✔️ fi-tox-python38 SUCCESS in 10m 48s
✔️ fi-tox-python39 SUCCESS in 9m 05s
✔️ fi-tox-python310 SUCCESS in 10m 23s
✔️ fi-tox-python311 SUCCESS in 8m 49s
✔️ fi-tox-docs SUCCESS in 7m 38s
✔️ fi-tox-bandit SUCCESS in 6m 22s
✔️ fi-tox-diff-cover SUCCESS in 11m 07s

@Freedisch
Copy link
Contributor Author

@Zlopez, I fixed the failing CIs, This PR is now ready for review

Copy link
Contributor

@Zlopez Zlopez left a comment

Choose a reason for hiding this comment

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

I see some imports I don't understand.

And also the conflicts needs to be fixed (maybe master branch in your fork is outdated).

pyproject.toml Outdated
@@ -119,6 +119,8 @@ Werkzeug = "3.0.1"
toml = "^0.10.2"
webargs = "^8.2.0"
WTForms = "^3.0.1"
attr = "^0.3.2"
Copy link
Contributor

Choose a reason for hiding this comment

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

Why adding those two dependencies? I don't see them imported anywhere.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

From the Tox-docs CI, There was an issue with filters.py inside /workspace/src/github.com/fedora-infra/anitya/.tox/docs/lib/python3.11/site-packages/attr/. This problem is occurring during an attempt to install idna, and attrs using Poetry.
To fix that issue I installed manually both dependencies.

Screenshot 2024-03-13 at 14 20 44

Copy link
Contributor

Choose a reason for hiding this comment

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

This isn't related to Anitya project but it's issue in dependencies of pip or poetry. Those shouldn't be in the dependencies for Anitya as we don't use them. We should only update poetry.lock file.

Copy link
Contributor

Choose a reason for hiding this comment

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

Let me do that in separate PR.

Copy link
Contributor

Choose a reason for hiding this comment

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

The PR is now available #1740. Could you remove changes in poetry.lock and pyproject.toml from this PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, Got it

Copy link

Build succeeded.
https://fedora.softwarefactory-project.io/zuul/buildset/69494257851249b78b9f6afed58f3812

✔️ fi-tox-mypy SUCCESS in 7m 32s
✔️ fi-tox-lint SUCCESS in 6m 04s
✔️ fi-tox-format SUCCESS in 4m 44s
✔️ fi-tox-python38 SUCCESS in 11m 14s
✔️ fi-tox-python39 SUCCESS in 10m 59s
✔️ fi-tox-python310 SUCCESS in 10m 59s
✔️ fi-tox-python311 SUCCESS in 8m 29s
✔️ fi-tox-docs SUCCESS in 8m 52s
✔️ fi-tox-bandit SUCCESS in 6m 53s
✔️ fi-tox-diff-cover SUCCESS in 12m 04s

@Zlopez
Copy link
Contributor

Zlopez commented Mar 13, 2024

I also noticed that the news file is missing.

Copy link

Build succeeded.
https://fedora.softwarefactory-project.io/zuul/buildset/b08baf4d6f2e4d6f88aa1022289c445a

✔️ fi-tox-mypy SUCCESS in 5m 54s
✔️ fi-tox-lint SUCCESS in 4m 57s
✔️ fi-tox-format SUCCESS in 5m 34s
✔️ fi-tox-python38 SUCCESS in 9m 55s
✔️ fi-tox-python39 SUCCESS in 9m 29s
✔️ fi-tox-python310 SUCCESS in 10m 18s
✔️ fi-tox-python311 SUCCESS in 10m 12s
✔️ fi-tox-docs SUCCESS in 7m 12s
✔️ fi-tox-bandit SUCCESS in 6m 24s
✔️ fi-tox-diff-cover SUCCESS in 10m 36s

Copy link

Build failed. More information on how to proceed and troubleshoot errors available at https://fedoraproject.org/wiki/Zuul-based-ci
https://fedora.softwarefactory-project.io/zuul/buildset/88f6065e2ef843a48cb786680a3a6e4b

✔️ fi-tox-mypy SUCCESS in 6m 27s
✔️ fi-tox-lint SUCCESS in 5m 30s
✔️ fi-tox-format SUCCESS in 5m 40s
✔️ fi-tox-python38 SUCCESS in 8m 56s
✔️ fi-tox-python39 SUCCESS in 8m 42s
✔️ fi-tox-python310 SUCCESS in 9m 41s
✔️ fi-tox-python311 SUCCESS in 9m 22s
✔️ fi-tox-docs SUCCESS in 7m 22s
✔️ fi-tox-bandit SUCCESS in 5m 31s
fi-tox-diff-cover FAILURE in 10m 16s

Copy link

Build failed. More information on how to proceed and troubleshoot errors available at https://fedoraproject.org/wiki/Zuul-based-ci
https://fedora.softwarefactory-project.io/zuul/buildset/b0902907209b4e7a9be71cef40ac04bc

✔️ fi-tox-mypy SUCCESS in 5m 26s
✔️ fi-tox-lint SUCCESS in 5m 09s
✔️ fi-tox-format SUCCESS in 5m 15s
✔️ fi-tox-python38 SUCCESS in 9m 16s
✔️ fi-tox-python39 SUCCESS in 9m 07s
✔️ fi-tox-python310 SUCCESS in 9m 13s
✔️ fi-tox-python311 SUCCESS in 8m 59s
✔️ fi-tox-docs SUCCESS in 6m 55s
✔️ fi-tox-bandit SUCCESS in 6m 21s
fi-tox-diff-cover FAILURE in 10m 45s

Copy link

Build succeeded.
https://fedora.softwarefactory-project.io/zuul/buildset/61f8e3c488154085be3118a60e0dd062

✔️ fi-tox-mypy SUCCESS in 5m 18s
✔️ fi-tox-lint SUCCESS in 6m 30s
✔️ fi-tox-format SUCCESS in 5m 16s
✔️ fi-tox-python38 SUCCESS in 9m 21s
✔️ fi-tox-python39 SUCCESS in 10m 26s
✔️ fi-tox-python310 SUCCESS in 8m 53s
✔️ fi-tox-python311 SUCCESS in 9m 15s
✔️ fi-tox-docs SUCCESS in 8m 06s
✔️ fi-tox-bandit SUCCESS in 5m 00s
✔️ fi-tox-diff-cover SUCCESS in 9m 53s

Signed-off-by: freedisch <[email protected]>
Copy link

Build succeeded.
https://fedora.softwarefactory-project.io/zuul/buildset/6d7db7a8628d4e0aa6d174f6297dd2aa

✔️ fi-tox-mypy SUCCESS in 6m 40s
✔️ fi-tox-lint SUCCESS in 5m 01s
✔️ fi-tox-format SUCCESS in 5m 13s
✔️ fi-tox-python38 SUCCESS in 9m 34s
✔️ fi-tox-python39 SUCCESS in 10m 37s
✔️ fi-tox-python310 SUCCESS in 9m 04s
✔️ fi-tox-python311 SUCCESS in 9m 08s
✔️ fi-tox-docs SUCCESS in 6m 30s
✔️ fi-tox-bandit SUCCESS in 5m 12s
✔️ fi-tox-diff-cover SUCCESS in 11m 15s

@Freedisch Freedisch requested a review from Zlopez March 13, 2024 17:52
@mergify mergify bot merged commit d08bb50 into fedora-infra:master Mar 14, 2024
8 checks passed
@Zlopez
Copy link
Contributor

Zlopez commented Mar 14, 2024

Thanks for the PR :-)

@Zlopez Zlopez linked an issue Mar 14, 2024 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add option to delete user to users management page
2 participants