fix(workflows): fix workflow access BE-13150 (#3032)

This commit is contained in:
andres-portainer
2026-06-24 17:07:51 -03:00
committed by GitHub
parent 79f2ad76cb
commit 68530e8a7e
+12 -1
View File
@@ -63,6 +63,7 @@ func FetchWorkflows(
for _, stack := range preFiltered {
wf := workflowMap[stack.WorkflowID]
hasAccessibleSource := false
outer:
for _, as := range wf.Artifacts {
if as.StackID != stack.ID {
@@ -70,7 +71,13 @@ func FetchWorkflows(
}
for _, f := range as.Files {
src := sourceMap[f.SourceID]
src, ok := sourceMap[f.SourceID]
if !ok {
continue
}
hasAccessibleSource = true
if src.Type == portainer.SourceTypeGit {
gitConfigs[stack.ID] = MergeSourceAndFile(&src, &f)
break outer
@@ -78,6 +85,10 @@ func FetchWorkflows(
}
}
if stack.Type == portainer.KubernetesStack && !hasAccessibleSource {
continue
}
filtered = append(filtered, stack)
}
stacks = filtered