Skip to content

Commit

Permalink
Workspace UI will not load if historyRoles or operationRoles is undef…
Browse files Browse the repository at this point in the history
…ined

Fixes microsoft#3755
  • Loading branch information
marrobi committed Oct 18, 2023
1 parent 80e5268 commit 42d7a26
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ BUG FIXES:
* Upgrade porter version to v1.0.15 and on error getting porter outputs return dict ([#3744](https://github.com/microsoft/AzureTRE/issues/3744))
* Fix notifications displaying workspace name rather than actual resource ([#3746](https://github.com/microsoft/AzureTRE/issues/3746))
* Fix SecuredByRole fails if app roles are not loaded ([#3752](https://github.com/microsoft/AzureTRE/issues/3752))
* Fix workspace not loading fails if operation or history roles are not loaded ([#3755](https://github.com/microsoft/AzureTRE/issues/3755))


COMPONENTS:

Expand Down
2 changes: 1 addition & 1 deletion ui/app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tre-ui",
"version": "0.5.14",
"version": "0.5.15",
"private": true,
"dependencies": {
"@azure/msal-browser": "^2.35.0",
Expand Down
4 changes: 2 additions & 2 deletions ui/app/src/components/shared/ResourceBody.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,15 @@ export const ResourceBody: React.FunctionComponent<ResourceBodyProps> = (props:
</PivotItem>
}
{
!props.readonly &&
!props.readonly && historyRoles &&
<PivotItem headerText="History">
<SecuredByRole allowedAppRoles={historyRoles} allowedWorkspaceRoles={historyRoles} workspaceId={workspaceId} errorString={`Must have ${historyRoles.join(" or ")} role`} element={
<ResourceHistoryList resource={props.resource} />
} />
</PivotItem>
}
{
!props.readonly &&
!props.readonly && operationsRoles &&
<PivotItem headerText="Operations">
<SecuredByRole allowedAppRoles={operationsRoles} allowedWorkspaceRoles={operationsRoles} workspaceId={workspaceId} errorString={`Must have ${operationsRoles.join(" or ")} role`} element={
<ResourceOperationsList resource={props.resource} />
Expand Down

0 comments on commit 42d7a26

Please sign in to comment.