user_groups: Add FULL_MEMBERS_GROUP_NAME constant.

We now use FULL_MEMBERS_GROUP_NAME instead of
writing the actual full members system group
name at multiple places, so that we can have
all the group names coded at one place only.
This commit is contained in:
Sahil Batra
2022-08-06 13:34:44 +05:30
committed by Tim Abbott
parent aef0b6fad4
commit 31d639160f
8 changed files with 21 additions and 13 deletions

View File

@@ -1598,7 +1598,7 @@ def add_users_to_system_user_groups(
realm: Realm, user_profiles: List[UserProfile], role_system_groups_dict: Dict[int, UserGroup]
) -> None:
full_members_system_group = UserGroup.objects.get(
name="@role:fullmembers",
name=UserGroup.FULL_MEMBERS_GROUP_NAME,
realm=realm,
is_system_group=True,
)