Add page to archive user

Users can only be archived by Platform Admin from the user page
(/users/<user_id>). This removes them from all services and orgs and
updates their details.
This commit is contained in:
Katie Smith
2019-05-22 11:38:47 +01:00
parent 7b3d522070
commit 00bb7a0ea0
6 changed files with 58 additions and 1 deletions

View File

@@ -65,6 +65,10 @@ class UserApiClient(NotifyAdminAPIClient):
user_data = self.post(url, data=data)
return user_data['data']
@cache.delete('user-{user_id}')
def archive_user(self, user_id):
return self.post('/user/{}/archive'.format(user_id), data=None)
@cache.delete('user-{user_id}')
def reset_failed_login_count(self, user_id):
url = "/user/{}/reset-failed-login-count".format(user_id)