models: Replace is_guest and is_realm_admin with UserProfile.role.

This new data model will be more extensible for future work on
features like a primary administrator.
This commit is contained in:
Rishi Gupta
2019-10-04 17:35:07 -07:00
committed by Tim Abbott
parent 4256ee61cf
commit e10361a832
24 changed files with 191 additions and 80 deletions

View File

@@ -63,8 +63,7 @@ def build_user_profile(avatar_source: str,
full_name: str,
id: int,
is_active: bool,
is_realm_admin: bool,
is_guest: bool,
role: int,
is_mirror_dummy: bool,
realm_id: int,
short_name: str,
@@ -79,8 +78,7 @@ def build_user_profile(avatar_source: str,
id=id,
is_mirror_dummy=is_mirror_dummy,
is_active=is_active,
is_realm_admin=is_realm_admin,
is_guest=is_guest,
role=role,
pointer=pointer,
realm_id=realm_id,
short_name=short_name,