@@ -6,6 +6,7 @@ import { Loader } from "components/Loader/Loader";
66import { Margins } from "components/Margins/Margins" ;
77import { TabLink , Tabs , TabsList } from "components/Tabs/Tabs" ;
88import { workspacePermissionChecks } from "modules/permissions/workspaces" ;
9+ import { useAuthenticated } from "contexts/auth/RequireAuth" ;
910import {
1011type FC ,
1112type PropsWithChildren ,
@@ -73,6 +74,7 @@ export const TemplateLayout: FC<PropsWithChildren> = ({
7374children= < Outlet /> ,
7475} ) => {
7576const navigate = useNavigate ( ) ;
77+ const { user :me } = useAuthenticated ( ) ;
7678const { organization :organizationName = "default" , template :templateName } =
7779useParams ( ) as { organization ?:string ; template :string } ;
7880const { data, error, isLoading} = useQuery ( {
@@ -81,7 +83,7 @@ export const TemplateLayout: FC<PropsWithChildren> = ({
8183} ) ;
8284const workspacePermissionsQuery = useQuery (
8385checkAuthorization ( {
84- checks :workspacePermissionChecks ( organizationName ) ,
86+ checks :workspacePermissionChecks ( organizationName , me . id ) ,
8587} ) ,
8688) ;
8789