users: Add support for changing user role to moderator in api.

This commit adds backend support for changing a user role to
moderator and also to change role from moderator to any other
role.
This commit is contained in:
sahil839
2021-04-19 22:11:20 +05:30
committed by Tim Abbott
parent 34f134d58d
commit dc771f3a14
4 changed files with 43 additions and 1 deletions

View File

@@ -1186,6 +1186,7 @@ class UserProfile(AbstractBaseUser, PermissionsMixin):
ROLE_TYPES = [
ROLE_REALM_OWNER,
ROLE_REALM_ADMINISTRATOR,
ROLE_MODERATOR,
ROLE_MEMBER,
ROLE_GUEST,
]