user_groups: Track acting user for user group creation.

This is a prep-commit for populating RealmAuditLogs for changes made to
UserGroup.

Signed-off-by: Zixuan James Li <p359101898@gmail.com>
This commit is contained in:
Zixuan James Li
2022-11-20 18:37:11 -08:00
committed by Tim Abbott
parent a1bc9adefc
commit b3aba796f1
12 changed files with 72 additions and 36 deletions

View File

@@ -43,7 +43,9 @@ def add_user_group(
description: str = REQ(),
) -> HttpResponse:
user_profiles = user_ids_to_users(members, user_profile.realm)
check_add_user_group(user_profile.realm, name, user_profiles, description)
check_add_user_group(
user_profile.realm, name, user_profiles, description, acting_user=user_profile
)
return json_success(request)