-
Notifications
You must be signed in to change notification settings - Fork 145
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add route to retrieve users assigned to a workspace with UI (#4058)
* View users who are assigned roles within a workspace Fixes #4049 * Fix iteration through roles. * remove unused metadata --------- Co-authored-by: Tim Allen <[email protected]>
- Loading branch information
1 parent
93e9a37
commit 400766b
Showing
19 changed files
with
441 additions
and
243 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
__version__ = "0.18.11" | ||
__version__ = "0.19.2" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
from pydantic import BaseModel, Field | ||
from typing import List | ||
|
||
from models.domain.authentication import User | ||
|
||
|
||
class UsersInResponse(BaseModel): | ||
users: List[User] = Field(..., title="Users", description="List of users assigned to the workspace") | ||
|
||
class Config: | ||
schema_extra = { | ||
"example": { | ||
"users": [ | ||
{ | ||
"id": 1, | ||
"name": "John Doe", | ||
"email": "[email protected]", | ||
"roles": ["WorkspaceOwner", "WorkspaceResearcher"] | ||
}, | ||
{ | ||
"id": 2, | ||
"name": "Jane Smith", | ||
"email": "[email protected]", | ||
"roles": ["WorkspaceResearcher"] | ||
} | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -135,7 +135,7 @@ def log_in_with_researcher_user(self, app, researcher_user): | |
patch("api.routes.workspaces.OperationRepository.resource_has_deployed_operation"), \ | ||
patch("api.routes.airlock.AirlockRequestRepository.save_item"), \ | ||
patch("api.dependencies.workspaces.WorkspaceRepository.get_workspace_by_id"), \ | ||
patch("services.aad_authentication.AzureADAuthorization.get_workspace_role_assignment_details", return_value={"WorkspaceResearcher": ["[email protected]"], "WorkspaceOwner": ["[email protected]"], "AirlockManager": ["[email protected]"]}): | ||
patch("services.aad_authentication.AzureADAuthorization.get_workspace_user_emails_by_role_assignment", return_value={"WorkspaceResearcher": ["[email protected]"], "WorkspaceOwner": ["[email protected]"], "AirlockManager": ["[email protected]"]}): | ||
yield | ||
app.dependency_overrides = {} | ||
|
||
|
Oops, something went wrong.