File tree 2 files changed +7
-9
lines changed
site/src/pages/CreateWorkspacePage
2 files changed +7
-9
lines changed Original file line number Diff line number Diff line change @@ -66,7 +66,10 @@ const CreateWorkspacePageExperimental: FC = () => {
66
66
const permissionsQuery = useQuery (
67
67
templateQuery . data
68
68
? checkAuthorization ( {
69
- checks : workspacePermissionChecks ( templateQuery . data . organization_id ) ,
69
+ checks : workspacePermissionChecks (
70
+ templateQuery . data . organization_id ,
71
+ me . id ,
72
+ ) ,
70
73
} )
71
74
: { enabled : false } ,
72
75
) ;
Original file line number Diff line number Diff line change @@ -25,12 +25,7 @@ import {
25
25
useMemo ,
26
26
useState ,
27
27
} 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" ;
34
29
import {
35
30
type AutofillBuildParameter ,
36
31
getInitialRichParameterValues ,
@@ -258,7 +253,7 @@ export const CreateWorkspacePageViewExperimental: FC<
258
253
< hgroup >
259
254
< h2 className = "text-xl font-semibold m-0" > General</ h2 >
260
255
< p className = "text-sm text-content-secondary mt-0" >
261
- { permissions . createWorkspaceForUser
256
+ { permissions . createWorkspace
262
257
? "Only admins can create workspaces for other users."
263
258
: "The name of your new workspace." }
264
259
</ p >
@@ -305,7 +300,7 @@ export const CreateWorkspacePageViewExperimental: FC<
305
300
</ div >
306
301
</ div >
307
302
</ div >
308
- { permissions . createWorkspaceForUser && (
303
+ { permissions . createWorkspace && (
309
304
< div className = "flex flex-col gap-2 flex-1" >
310
305
< Label className = "text-sm" htmlFor = { `${ id } -workspace-name` } >
311
306
Owner
You can’t perform that action at this time.
0 commit comments