mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 05:23:35 +00:00
settings: Add group_creator as default for can_manage_group.
We create an unnamed user group with just the group creator as it's member when trying to set the default. The pattern I've followed across most of the acting_user additions is to just put the user declared somewhere before the check_add_user_group and see if the test passes. If it does not, then I'll look at what kind of user it needs to be set to `acting_user`.
This commit is contained in:
committed by
Tim Abbott
parent
91edf59873
commit
12ebd97f1f
@@ -679,10 +679,10 @@ class TestMessageNotificationEmails(ZulipTestCase):
|
||||
cordelia = self.example_user("cordelia")
|
||||
|
||||
hamlet_only = check_add_user_group(
|
||||
get_realm("zulip"), "hamlet_only", [hamlet], acting_user=None
|
||||
get_realm("zulip"), "hamlet_only", [hamlet], acting_user=hamlet
|
||||
)
|
||||
hamlet_and_cordelia = check_add_user_group(
|
||||
get_realm("zulip"), "hamlet_and_cordelia", [hamlet, cordelia], acting_user=None
|
||||
get_realm("zulip"), "hamlet_and_cordelia", [hamlet, cordelia], acting_user=hamlet
|
||||
)
|
||||
|
||||
hamlet_only_message_id = self.send_stream_message(othello, "Denmark", "@*hamlet_only*")
|
||||
@@ -717,7 +717,7 @@ class TestMessageNotificationEmails(ZulipTestCase):
|
||||
othello = self.example_user("othello")
|
||||
|
||||
hamlet_and_cordelia = check_add_user_group(
|
||||
get_realm("zulip"), "hamlet_and_cordelia", [hamlet, cordelia], acting_user=None
|
||||
get_realm("zulip"), "hamlet_and_cordelia", [hamlet, cordelia], acting_user=hamlet
|
||||
)
|
||||
|
||||
user_group_mentioned_message_id = self.send_stream_message(
|
||||
@@ -754,7 +754,7 @@ class TestMessageNotificationEmails(ZulipTestCase):
|
||||
othello = self.example_user("othello")
|
||||
|
||||
hamlet_and_cordelia = check_add_user_group(
|
||||
get_realm("zulip"), "hamlet_and_cordelia", [hamlet, cordelia], acting_user=None
|
||||
get_realm("zulip"), "hamlet_and_cordelia", [hamlet, cordelia], acting_user=hamlet
|
||||
)
|
||||
|
||||
topic_wildcard_mentioned_in_followed_topic_message_id = self.send_stream_message(
|
||||
@@ -1628,14 +1628,14 @@ class TestMessageNotificationEmails(ZulipTestCase):
|
||||
# user groups having upto 'MAX_GROUP_SIZE_FOR_MENTION_REACTIVATION'
|
||||
# members are small user groups.
|
||||
small_user_group = check_add_user_group(
|
||||
zulip_realm, "small_user_group", [hamlet, othello], acting_user=None
|
||||
zulip_realm, "small_user_group", [hamlet, othello], acting_user=hamlet
|
||||
)
|
||||
|
||||
large_user_group = check_add_user_group(
|
||||
zulip_realm, "large_user_group", [hamlet], acting_user=None
|
||||
zulip_realm, "large_user_group", [hamlet], acting_user=hamlet
|
||||
)
|
||||
subgroup = check_add_user_group(
|
||||
zulip_realm, "subgroup", [othello, cordelia], acting_user=None
|
||||
zulip_realm, "subgroup", [othello, cordelia], acting_user=hamlet
|
||||
)
|
||||
add_subgroups_to_user_group(large_user_group, [subgroup], acting_user=None)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user