Content-Length: 276557 | pFad | http://github.com/coder/coder/commit/3b4343ddf3c46404b18583bc8407f941179a8b86

4F fix: fix workspace creation on template page (#17518) · coder/coder@3b4343d · GitHub
Skip to content

Commit 3b4343d

Browse files
authored
fix: fix workspace creation on template page (#17518)
1 parent 5a7d531 commit 3b4343d

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

site/src/pages/TemplatePage/TemplateLayout.tsx

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,14 @@ export const TemplateLayout: FC<PropsWithChildren> = ({
8585
queryFn: () => fetchTemplate(organizationName, templateName),
8686
});
8787
const workspacePermissionsQuery = useQuery(
88-
checkAuthorization({
89-
checks: workspacePermissionChecks(organizationName, me.id),
90-
}),
88+
data
89+
? checkAuthorization({
90+
checks: workspacePermissionChecks(
91+
data.template.organization_id,
92+
me.id,
93+
),
94+
})
95+
: { enabled: false },
9196
);
9297

9398
const location = useLocation();

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/coder/coder/commit/3b4343ddf3c46404b18583bc8407f941179a8b86

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy