user_groups: Audit UserGroup memberships changes.

This also add audit log entries during user creation and role change,
because we modify system group memberships there.

Signed-off-by: Zixuan James Li <p359101898@gmail.com>
This commit is contained in:
Zixuan James Li
2022-11-20 22:26:34 -08:00
committed by Tim Abbott
parent 63f5936207
commit 44781ddfa9
7 changed files with 168 additions and 4 deletions

View File

@@ -939,7 +939,7 @@ class LoginTest(ZulipTestCase):
ContentType.objects.clear_cache()
# Ensure the number of queries we make is not O(streams)
with self.assert_database_query_count(102), cache_tries_captured() as cache_tries:
with self.assert_database_query_count(104), cache_tries_captured() as cache_tries:
with self.captureOnCommitCallbacks(execute=True):
self.register(self.nonreg_email("test"), "test")