forked from zulip/zulip
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
audit_log: Log acting_user in do_change_user_role.
- Loading branch information
Showing
6 changed files
with
16 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -64,7 +64,7 @@ def handle(self, *args: Any, **options: Any) -> None: | |
shylock = create_user('[email protected]', 'Shylock', realm, | ||
full_name='Shylock', short_name='shylock', | ||
role=UserProfile.ROLE_REALM_ADMINISTRATOR) | ||
do_change_user_role(shylock, UserProfile.ROLE_REALM_ADMINISTRATOR) | ||
do_change_user_role(shylock, UserProfile.ROLE_REALM_ADMINISTRATOR, acting_user=None) | ||
stream = Stream.objects.create( | ||
name='all', realm=realm, date_created=installation_time) | ||
recipient = Recipient.objects.create(type_id=stream.id, type=Recipient.STREAM) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -301,12 +301,12 @@ def handle(self, **options: Any) -> None: | |
create_users(zulip_realm, names, tos_version=settings.TOS_VERSION) | ||
|
||
iago = get_user_by_delivery_email("[email protected]", zulip_realm) | ||
do_change_user_role(iago, UserProfile.ROLE_REALM_ADMINISTRATOR) | ||
do_change_user_role(iago, UserProfile.ROLE_REALM_ADMINISTRATOR, acting_user=None) | ||
iago.is_staff = True | ||
iago.save(update_fields=['is_staff']) | ||
|
||
desdemona = get_user_by_delivery_email("[email protected]", zulip_realm) | ||
do_change_user_role(desdemona, UserProfile.ROLE_REALM_OWNER) | ||
do_change_user_role(desdemona, UserProfile.ROLE_REALM_OWNER, acting_user=None) | ||
|
||
guest_user = get_user_by_delivery_email("[email protected]", zulip_realm) | ||
guest_user.role = UserProfile.ROLE_GUEST | ||
|