chore: log the user triggering the retirement flow

chore: change user retirement permissions to allow support staff
This commit is contained in:
Ali Nawaz
2023-03-29 08:02:25 +05:00
committed by zawan-ila
parent 1436125864
commit 9c06ef5c17
3 changed files with 21 additions and 1 deletions

View File

@@ -57,6 +57,8 @@ class BulkUsersRetirementView(APIView):
user_to_retire = User.objects.get(username=username)
with transaction.atomic():
create_retirement_request_and_deactivate_account(user_to_retire)
log.info(f'The user "{username}" has been added to the retirement pipeline \
by "{request.user}"')
except User.DoesNotExist:
log.exception(f'The user "{username}" does not exist.')