Skip to content

Commit 706bbd5

Browse files
committed
Fix permissions for restart workspace
1 parent 691c028 commit 706bbd5

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

site/src/pages/WorkspacePage/WorkspaceNotifications.tsx

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import AlertTitle from "@mui/material/AlertTitle";
2-
import Button from "@mui/material/Button";
32
import { workspaceResolveAutostart } from "api/queries/workspaceQuota";
43
import { Template, TemplateVersion, Workspace } from "api/typesGenerated";
54
import { Alert, AlertDetail, AlertProps } from "components/Alert/Alert";
@@ -78,12 +77,14 @@ export const WorkspaceNotifications: FC<WorkspaceNotificationsProps> = (
7877
? `${workspace.health.failing_agents.length} agents are unhealthy`
7978
: `1 agent is unhealthy`
8079
}.`,
81-
actions: [
82-
{
83-
label: "Restart",
84-
onClick: onRestartWorkspace,
85-
},
86-
],
80+
actions: permissions.updateWorkspace
81+
? [
82+
{
83+
label: "Restart",
84+
onClick: onRestartWorkspace,
85+
},
86+
]
87+
: undefined,
8788
});
8889
}
8990

0 commit comments

Comments
 (0)