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

@@ -62,5 +62,5 @@ def delete_realm_playground(
request: HttpRequest, user_profile: UserProfile, playground_id: int
) -> HttpResponse:
realm_playground = access_playground_by_id(user_profile.realm, playground_id)
do_remove_realm_playground(user_profile.realm, realm_playground)
do_remove_realm_playground(user_profile.realm, realm_playground, acting_user=user_profile)
return json_success(request)