mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
fix: fix workspace creation on template page (#17518)
This commit is contained in:
@@ -85,9 +85,14 @@ export const TemplateLayout: FC<PropsWithChildren> = ({
|
||||
queryFn: () => fetchTemplate(organizationName, templateName),
|
||||
});
|
||||
const workspacePermissionsQuery = useQuery(
|
||||
checkAuthorization({
|
||||
checks: workspacePermissionChecks(organizationName, me.id),
|
||||
}),
|
||||
data
|
||||
? checkAuthorization({
|
||||
checks: workspacePermissionChecks(
|
||||
data.template.organization_id,
|
||||
me.id,
|
||||
),
|
||||
})
|
||||
: { enabled: false },
|
||||
);
|
||||
|
||||
const location = useLocation();
|
||||
|
||||
Reference in New Issue
Block a user