mirror of https://github.com/zulip/zulip.git
audit log: Log which server admin deactivated a realm too.
This commit is contained in:
parent
0218da64f1
commit
1d44fd724b
|
@ -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:
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue