realm: Create RealmAuditLog entry when removing realm playgrounds.

This commit also adds 'acting_user' parameter to
do_remove_realm_playground function.

Fixes a part of #21268.
This commit is contained in:
Sahil Batra
2022-03-11 20:10:42 +05:30
committed by Tim Abbott
parent dea3389045
commit b86b9bdc02
5 changed files with 57 additions and 3 deletions

View File

@@ -1772,7 +1772,9 @@ class NormalActionsTest(BaseAction):
last_id = last_realm_playground.id
realm_playground = access_playground_by_id(self.user_profile.realm, last_id)
events = self.verify_action(
lambda: do_remove_realm_playground(self.user_profile.realm, realm_playground)
lambda: do_remove_realm_playground(
self.user_profile.realm, realm_playground, acting_user=None
)
)
check_realm_playgrounds("events[0]", events[0])