@@ -40,7 +40,7 @@ import {
4040import { useClickableTableRow } from "hooks/useClickableTableRow" ;
4141import { PlusIcon } from "lucide-react" ;
4242import { linkToTemplate , useLinks } from "modules/navigation" ;
43- import type { OrganizationPermissions } from "modules/permissions/organizations " ;
43+ import type { WorkspacePermissions } from "modules/permissions/workspaces " ;
4444import type { FC } from "react" ;
4545import { Link , useNavigate } from "react-router-dom" ;
4646import { createDayString } from "utils/createDayString" ;
@@ -88,13 +88,13 @@ const TemplateHelpTooltip: FC = () => {
8888interface TemplateRowProps {
8989showOrganizations :boolean ;
9090template :Template ;
91- orgPermissions :Record < string , OrganizationPermissions > | undefined ;
91+ workspacePermissions :Record < string , WorkspacePermissions > | undefined ;
9292}
9393
9494const TemplateRow :FC < TemplateRowProps > = ( {
9595showOrganizations,
9696template,
97- orgPermissions ,
97+ workspacePermissions ,
9898} ) => {
9999const getLink = useLinks ( ) ;
100100const templatePageLink = getLink (
@@ -159,7 +159,8 @@ const TemplateRow: FC<TemplateRowProps> = ({
159159< TableCell css = { styles . actionCell } >
160160{ template . deprecated ?(
161161< DeprecatedBadge />
162- ) :orgPermissions ?. [ template . organization_id ] ?. createWorkspaces ?(
162+ ) :workspacePermissions ?. [ template . organization_id ]
163+ ?. createWorkspaceForUser ?(
163164< MuiButton
164165size = "small"
165166css = { styles . actionButton }
@@ -186,7 +187,7 @@ export interface TemplatesPageViewProps {
186187canCreateTemplates :boolean ;
187188examples :TemplateExample [ ] | undefined ;
188189templates :Template [ ] | undefined ;
189- orgPermissions :Record < string , OrganizationPermissions > | undefined ;
190+ workspacePermissions :Record < string , WorkspacePermissions > | undefined ;
190191}
191192
192193export const TemplatesPageView :FC < TemplatesPageViewProps > = ( {
@@ -196,7 +197,7 @@ export const TemplatesPageView: FC<TemplatesPageViewProps> = ({
196197canCreateTemplates,
197198examples,
198199templates,
199- orgPermissions ,
200+ workspacePermissions ,
200201} ) => {
201202const isLoading = ! templates ;
202203const isEmpty = templates && templates . length === 0 ;
@@ -258,7 +259,7 @@ export const TemplatesPageView: FC<TemplatesPageViewProps> = ({
258259key = { template . id }
259260showOrganizations = { showOrganizations }
260261template = { template }
261- orgPermissions = { orgPermissions }
262+ workspacePermissions = { workspacePermissions }
262263/>
263264) )
264265) }