user_groups: Add "Nobody" system user group.

This commit adds code to create a "Nobody" system user group
to realms which will be used in settings to represent "Nobody"
option.

We also add a migration to add this group to existing realms.
This commit is contained in:
Sahil Batra
2023-03-27 08:58:12 +05:30
committed by Tim Abbott
parent ecead64718
commit bed2bf64c4
7 changed files with 95 additions and 28 deletions

View File

@@ -2224,6 +2224,7 @@ class UserGroup(models.Model): # type: ignore[django-manager-missing] # django-
MODERATORS_GROUP_NAME = "@role:moderators"
MEMBERS_GROUP_NAME = "@role:members"
EVERYONE_GROUP_NAME = "@role:everyone"
NOBODY_GROUP_NAME = "@role:nobody"
# We do not have "Full members" and "Everyone on the internet"
# group here since there isn't a separate role value for full