rhino_health.lib.endpoints.user.user_dataclass#

Module Contents#

Classes#

UserWorkgroupRole

The role the user has on the platform

User

Dataclass representing a User on the Rhino platform.

class rhino_health.lib.endpoints.user.user_dataclass.UserWorkgroupRole#

Bases: str, enum.Enum

The role the user has on the platform

MEMBER = 'Member'#
WORKGROUP_ADMIN = 'Workgroup Admin'#
ORG_ADMIN = 'Org Admin'#
RHINO_ADMIN = 'Rhino Admin'#
classmethod is_admin_member(member_role) bool#
classmethod is_non_admin_member(member_role, is_primary_workgroup=False) bool#
class rhino_health.lib.endpoints.user.user_dataclass.User(**data)#

Dataclass representing a User on the Rhino platform.

property workgroups: List[Workgroup]#

Return the Workgroup Dataclasses associated with workgroup_uids

Warning

The result of this function is cached. Be careful calling this function after making changes. All dataclasses must already exist on the platform before making this call.

Returns:
workgroups: List[Workgroup]

Dataclasses representing the Workgroup

property primary_workgroup: Workgroup#

Return the Workgroup Dataclass associated with primary_workgroup_uid

Warning

The result of this function is cached. Be careful calling this function after making changes. All dataclasses must already exist on the platform before making this call.

Returns:
primary_workgroup: Workgroup

Dataclass representing the Workgroup

uid: str#

Unique ID of the user

full_name: str#

The full name of the user

workgroup_uids: List[str]#

Additional workgroup unique IDs the user belongs to

primary_workgroup_role: UserWorkgroupRole | None#

Elevated roles the user has in their primary workgroup.

workgroup_names: List[str]#

The workgroup names

primary_workgroup_name: str#

The primary_workgroup name