audit log: Log which server admin deactivated a realm too.

This commit is contained in:
Tim Abbott 2019-05-08 15:04:31 -07:00
parent 0218da64f1
commit 1d44fd724b
2 changed files with 2 additions and 2 deletions

View File

@ -437,7 +437,7 @@ class TestSupportEndpoint(ZulipTestCase):
with mock.patch("analytics.views.do_deactivate_realm") as m:
result = self.client_post("/activity/support", {"realm_id": "3", "status": "deactivated"})
m.assert_called_once_with(get_realm("lear"))
m.assert_called_once_with(get_realm("lear"), self.example_user("iago"))
self.assert_in_success_response(["Lear & Co. deactivated"], result)
with mock.patch("analytics.views.do_reactivate_realm") as m:

View File

@ -1060,7 +1060,7 @@ def support(request: HttpRequest) -> HttpResponse:
do_reactivate_realm(realm)
context["message"] = "{} reactivated.".format(realm.name)
elif status == "deactivated":
do_deactivate_realm(realm)
do_deactivate_realm(realm, request.user)
context["message"] = "{} deactivated.".format(realm.name)
scrub_realm = request.POST.get("scrub_realm", None)