Skip to content

Commit 99f2964

Browse files
authored
Merge branch 'main' into jaaydenh/checkbox-component
2 parents c64f5c3 + e64140e commit 99f2964

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

site/src/pages/CreateWorkspacePage/CreateWorkspacePageExperimental.tsx

+4-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,10 @@ const CreateWorkspacePageExperimental: FC = () => {
6666
const permissionsQuery = useQuery(
6767
templateQuery.data
6868
? checkAuthorization({
69-
checks: workspacePermissionChecks(templateQuery.data.organization_id),
69+
checks: workspacePermissionChecks(
70+
templateQuery.data.organization_id,
71+
me.id,
72+
),
7073
})
7174
: { enabled: false },
7275
);

site/src/pages/CreateWorkspacePage/CreateWorkspacePageViewExperimental.tsx

+3-8
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,7 @@ import {
2525
useMemo,
2626
useState,
2727
} from "react";
28-
import { Link } from "react-router-dom";
29-
import {
30-
getFormHelpers,
31-
nameValidator,
32-
onChangeTrimmed,
33-
} from "utils/formUtils";
28+
import { getFormHelpers, nameValidator } from "utils/formUtils";
3429
import {
3530
type AutofillBuildParameter,
3631
getInitialRichParameterValues,
@@ -258,7 +253,7 @@ export const CreateWorkspacePageViewExperimental: FC<
258253
<hgroup>
259254
<h2 className="text-xl font-semibold m-0">General</h2>
260255
<p className="text-sm text-content-secondary mt-0">
261-
{permissions.createWorkspaceForUser
256+
{permissions.createWorkspace
262257
? "Only admins can create workspaces for other users."
263258
: "The name of your new workspace."}
264259
</p>
@@ -305,7 +300,7 @@ export const CreateWorkspacePageViewExperimental: FC<
305300
</div>
306301
</div>
307302
</div>
308-
{permissions.createWorkspaceForUser && (
303+
{permissions.createWorkspace && (
309304
<div className="flex flex-col gap-2 flex-1">
310305
<Label className="text-sm" htmlFor={`${id}-workspace-name`}>
311306
Owner

0 commit comments

Comments
 (0)