Skip to content

Commit

Permalink
Add email in User model
Browse files Browse the repository at this point in the history
  • Loading branch information
svetleo-evidently committed Apr 8, 2024
1 parent cc51acc commit ca37839
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/evidently/ui/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ class Team(BaseModel):
class User(BaseModel):
id: UserID = Field(default_factory=uuid.uuid4)
name: str
email: str = ""


def _default_dashboard():
Expand Down Expand Up @@ -406,10 +407,10 @@ def delete_team(self, user_id: UserID, team_id: TeamID):
self._delete_team(team_id)

@abstractmethod
def _list_team_users(self, team_id: TeamID) -> List[User]:
def _list_team_users(self, team_id: TeamID) -> List[UserID]:
raise NotImplementedError

def list_team_users(self, user_id: UserID, team_id: TeamID) -> List[User]:
def list_team_users(self, user_id: UserID, team_id: TeamID) -> List[UserID]:
if not self.check_team_permission(user_id, team_id, TeamPermission.READ):
raise TeamNotFound()
return self._list_team_users(team_id)
Expand Down
2 changes: 1 addition & 1 deletion src/evidently/ui/storage/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def _list_user_teams(self, user_id: UserID, include_virtual: bool) -> List[Team]
def _delete_team(self, team_id: TeamID):
pass

def _list_team_users(self, team_id: TeamID) -> List[User]:
def _list_team_users(self, team_id: TeamID) -> List[UserID]:
return []


Expand Down

0 comments on commit ca37839

Please sign in to comment.