mirror of
https://github.com/zulip/zulip.git
synced 2025-11-02 13:03:29 +00:00
audit_log: Log acting_user in user creation and user activation.
This commit is contained in:
@@ -45,12 +45,12 @@ From image editing program:
|
||||
stream = ensure_stream(realm, 'zulip features')
|
||||
|
||||
UserProfile.objects.filter(email__contains='stage').delete()
|
||||
starr = do_create_user('1@stage.example.com', 'password', realm, 'Ada Starr', '')
|
||||
starr = do_create_user('1@stage.example.com', 'password', realm, 'Ada Starr', '', acting_user=None)
|
||||
self.set_avatar(starr, 'static/images/characters/starr.png')
|
||||
fisher = do_create_user('2@stage.example.com', 'password', realm, 'Bel Fisher', '')
|
||||
fisher = do_create_user('2@stage.example.com', 'password', realm, 'Bel Fisher', '', acting_user=None)
|
||||
self.set_avatar(fisher, 'static/images/characters/fisher.png')
|
||||
twitter_bot = do_create_user('3@stage.example.com', 'password', realm, 'Twitter Bot', '',
|
||||
bot_type=UserProfile.DEFAULT_BOT)
|
||||
bot_type=UserProfile.DEFAULT_BOT, acting_user=None)
|
||||
self.set_avatar(twitter_bot, 'static/images/features/twitter.png')
|
||||
|
||||
bulk_add_subscriptions([stream], list(UserProfile.objects.filter(realm=realm)))
|
||||
|
||||
@@ -17,7 +17,7 @@ class Command(ZulipBaseCommand):
|
||||
name = '{:02}-user'.format(
|
||||
UserProfile.objects.filter(email__contains='user@').count())
|
||||
user = do_create_user(f'{name}@{string_id}.zulip.com',
|
||||
'password', realm, name, name, role=UserProfile.ROLE_REALM_ADMINISTRATOR)
|
||||
'password', realm, name, name, role=UserProfile.ROLE_REALM_ADMINISTRATOR, acting_user=None)
|
||||
assert realm.signup_notifications_stream is not None
|
||||
bulk_add_subscriptions([realm.signup_notifications_stream], [user])
|
||||
|
||||
|
||||
@@ -30,4 +30,4 @@ and will otherwise fall back to the zulip realm."""
|
||||
domain = realm.string_id + '.zulip.com'
|
||||
|
||||
name = '{:02}-user'.format(UserProfile.objects.filter(email__contains='user@').count())
|
||||
do_create_user(f'{name}@{domain}', 'password', valid_realm, name, name)
|
||||
do_create_user(f'{name}@{domain}', 'password', valid_realm, name, name, acting_user=None)
|
||||
|
||||
Reference in New Issue
Block a user