mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-07-23 09:29:14 -04:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user