Skip to content

Add ban/unban and approve/reject methods to User #1604

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

Closed
sathieu opened this issue Sep 17, 2021 · 1 comment · Fixed by #2061
Closed

Add ban/unban and approve/reject methods to User #1604

sathieu opened this issue Sep 17, 2021 · 1 comment · Fixed by #2061

Comments

@sathieu
Copy link
Contributor

sathieu commented Sep 17, 2021

Description of the problem, including code/CLI snippet

API has endpoints to manage the state of a user:

  • activate/deactivate: ✔️ already done
  • block/unblock: ✔️ already done
  • ban/unban: 🚧 TODO
  • approve/reject: 🚧 TODO
@sathieu sathieu changed the title Add ban/unaban and approve/reject methods to User Add ban/unban and approve/reject methods to User Oct 13, 2021
bgamari added a commit to bgamari/python-gitlab that referenced this issue Jun 9, 2022
bgamari added a commit to bgamari/python-gitlab that referenced this issue Jun 9, 2022
bgamari added a commit to bgamari/python-gitlab that referenced this issue Jun 9, 2022
bgamari added a commit to bgamari/python-gitlab that referenced this issue Jun 9, 2022
bgamari added a commit to bgamari/python-gitlab that referenced this issue Jun 9, 2022
@nejch
Copy link
Member

nejch commented Jun 10, 2022

@antoineauger as discussed if you want a break from k8s and work on this 😁

There's a PR that implements approve/reject endpoints for this issue in #2061 - you could do the same for ban/unban:
https://docs.gitlab.com/ee/api/users.html#ban-user
https://docs.gitlab.com/ee/api/users.html#unban-user

See my comments in the other PR for a bit of guidance, although ideally we'd also have 1 response per mock and 1 assert per test so we can remove assert_all_requests_are_fired=False.

In the case of ban/unban I think we could also add a quick functional test like for block/unblock. https://github.com/python-gitlab/python-gitlab/blob/main/tests/functional/api/test_users.py#L30-L37.

With both PRs in we could then close this issue. Of course if there's any hiccups along the way I'm happy to look at docs PRs as well if you feel like it 😀

nejch pushed a commit to bgamari/python-gitlab that referenced this issue Jun 25, 2022
As requested in python-gitlab#1604.

Co-authored-by: John Villalovos <john@sodarock.com>
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 26, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants