diff --git a/src/main/java/io/kestra/plugin/git/SyncFlows.java b/src/main/java/io/kestra/plugin/git/SyncFlows.java index 03de1ea9..5b1e7e36 100644 --- a/src/main/java/io/kestra/plugin/git/SyncFlows.java +++ b/src/main/java/io/kestra/plugin/git/SyncFlows.java @@ -194,7 +194,7 @@ protected Flow simulateResourceWrite(RunContext runContext, String renderedNames return null; } - return flowService(runContext).importFlow(runContext.flowInfo().tenantId(), SyncFlows.replaceNamespace(renderedNamespace, uri, inputStream), true); + return flowService(runContext).importFlow(runContext.tenantId(), SyncFlows.replaceNamespace(renderedNamespace, uri, inputStream), true); } @Override @@ -218,7 +218,7 @@ protected Flow writeResource(RunContext runContext, String renderedNamespace, UR String flowSource = SyncFlows.replaceNamespace(renderedNamespace, uri, inputStream); - return flowService(runContext).importFlow(runContext.flowInfo().tenantId(), flowSource); + return flowService(runContext).importFlow(runContext.tenantId(), flowSource); } private static String replaceNamespace(String renderedNamespace, URI uri, InputStream inputStream) throws IOException { @@ -264,10 +264,10 @@ protected SyncResult wrapper(RunContext runContext, String renderedGitDirectory, @Override protected List fetchResources(RunContext runContext, String renderedNamespace) { if (this.includeChildNamespaces) { - return flowService(runContext).findByNamespacePrefix(runContext.flowInfo().tenantId(), renderedNamespace); + return flowService(runContext).findByNamespacePrefix(runContext.tenantId(), renderedNamespace); } - return flowService(runContext).findByNamespace(runContext.flowInfo().tenantId(), renderedNamespace); + return flowService(runContext).findByNamespace(runContext.tenantId(), renderedNamespace); } @Override diff --git a/src/main/java/io/kestra/plugin/git/services/GitService.java b/src/main/java/io/kestra/plugin/git/services/GitService.java index 63e02b5d..37fe2060 100644 --- a/src/main/java/io/kestra/plugin/git/services/GitService.java +++ b/src/main/java/io/kestra/plugin/git/services/GitService.java @@ -85,7 +85,7 @@ public void namespaceAccessGuard(RunContext runContext, String namespaceToAccess FlowService flowService = ((DefaultRunContext)runContext).getApplicationContext().getBean(FlowService.class); RunContext.FlowInfo flowInfo = runContext.flowInfo(); flowService.checkAllowedNamespace( - runContext.flowInfo().tenantId(), + runContext.tenantId(), runContext.render(namespaceToAccess), flowInfo.tenantId(), flowInfo.namespace()