refactor(workflow): drop the root identity alias from workflow definitions
This commit is contained in:
1 parent
44a10943c3
commit
db982f2d93
5 files changed
+2
-14
No files matched your search
@@ -81,7 +81,6 @@ func TestCredentialUsesPinnedExecutionIdentity(t *testing.T) {
|
||||
denied bool
|
||||
}{
|
||||
{"id: x\nidentity: execution-agent\n", "execution-agent", false},
|
||||
{"id: x\nidentity: root\n", "", false},
|
||||
{"id: x\n", "", true},
|
||||
} {
|
||||
task := &task.Task{Identity: "requester", WorkflowDefinitionYAML: tt.definition}
|
||||
|
||||
@@ -20,7 +20,6 @@ import (
|
||||
"github.com/samcharles93/archie-core/internal/domain/identity"
|
||||
"github.com/samcharles93/archie-core/internal/domain/presence"
|
||||
"github.com/samcharles93/archie-core/internal/domain/storecontract"
|
||||
"github.com/samcharles93/archie-core/internal/domain/workflow"
|
||||
"github.com/samcharles93/archie-core/internal/domain/workflow/task"
|
||||
"github.com/samcharles93/archie-core/internal/events"
|
||||
"github.com/samcharles93/archie-core/internal/infrastructure/rpctls"
|
||||
@@ -356,9 +355,6 @@ func executionReference(t *task.Task) (string, error) {
|
||||
if iface.Identity == "" {
|
||||
return "", fmt.Errorf("pinned workflow declares no execution identity")
|
||||
}
|
||||
if iface.Identity == workflow.RootRef {
|
||||
return "", nil
|
||||
}
|
||||
return iface.Identity, nil
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user