-
Notifications
You must be signed in to change notification settings - Fork 673
Closed

Description
Hi Gauvain,
Is it possible to block a user with python-gitlab ?
This feature is already available in pyapi-gitlab:
def blockuser(self, user_id, **kwargs):
"""Block a user.
:param user_id: id of the user to change
:param kwargs: Any param the the Gitlab API supports
:return: Dict of the user
"""
data = {}
if kwargs:
data.update(kwargs)
request = requests.put("{0}/{1}/block".format(self.users_url, user_id),
headers=self.headers, data=data,
timeout=self.timeout,
verify=self.verify_ssl)
if request.status_code == 200:
return request.json()
else:
return False
Thank you.
Asher256
Metadata
Metadata
Assignees
Labels
No labels