diff --git a/backend/internal/flow/common/constants.go b/backend/internal/flow/common/constants.go index ab4c4a7bef..8511b574b4 100644 --- a/backend/internal/flow/common/constants.go +++ b/backend/internal/flow/common/constants.go @@ -272,11 +272,12 @@ const ( ActionTypeSubmit ActionType = "SUBMIT" // ActionTypeReject represents a reject/deny action ActionTypeReject ActionType = "REJECT" - // ActionTypeSignOutConfirm marks the confirmation prompt's action edge in a sign-out flow. When the - // End-User confirms, the prompt node forwards this type to the session sign-out node (as the action - // type in ForwardedData), which reads it to tell a confirmed re-run apart from the initial request, - // so no runtime flag has to be persisted. - ActionTypeSignOutConfirm ActionType = "SIGN_OUT_CONFIRM" + // ActionTypeConfirm marks a confirmation prompt's action edge. When the End-User confirms, the + // prompt node forwards this type to the next node (as the action type in ForwardedData), where the + // executor that routed to the prompt reads it to tell a confirmed re-run apart from the initial + // request, so no runtime flag has to be persisted. It is deliberately not tied to one use case: + // the session sign-out executor is its first consumer, not its only possible one. + ActionTypeConfirm ActionType = "CONFIRM" ) // ForwardedData key constants define keys used in the ForwardedData map. diff --git a/backend/internal/flow/executor/session_signout_executor.go b/backend/internal/flow/executor/session_signout_executor.go index 5d541eb85a..e9a5982328 100644 --- a/backend/internal/flow/executor/session_signout_executor.go +++ b/backend/internal/flow/executor/session_signout_executor.go @@ -115,7 +115,7 @@ func (e *sessionSignOutExecutor) decide(ctx *providers.NodeContext) signOutOutco actionType, _ := ctx.ForwardedData[common.ForwardedDataKeyActionType].(string) switch common.ActionType(actionType) { - case common.ActionTypeSignOutConfirm: + case common.ActionTypeConfirm: return signOutTerminate default: // The initial request forwards no action type at all, and a type this executor does not diff --git a/backend/internal/flow/executor/session_signout_executor_test.go b/backend/internal/flow/executor/session_signout_executor_test.go index 3388ab33cf..9edd75b6ba 100644 --- a/backend/internal/flow/executor/session_signout_executor_test.go +++ b/backend/internal/flow/executor/session_signout_executor_test.go @@ -115,7 +115,7 @@ func (suite *SessionSignOutExecutorTestSuite) TestPromptsWhenConfirmationRequire } // TestTerminatesAfterConfirmation covers the re-run after the End-User confirms: the confirmation -// prompt forwards its sign-out confirm action type, so the executor terminates the session instead of +// prompt forwards its confirm action type, so the executor terminates the session instead of // prompting again. func (suite *SessionSignOutExecutorTestSuite) TestTerminatesAfterConfirmation() { sso := sessionmock.NewServiceMock(suite.T()) @@ -127,7 +127,7 @@ func (suite *SessionSignOutExecutorTestSuite) TestTerminatesAfterConfirmation() ctx.NodeProperties = map[string]interface{}{propertyKeyPromptOnSignOut: true} ctx.RuntimeData = map[string]string{common.RuntimeKeyLogoutPromptRequired: dataValueTrue} ctx.ForwardedData = map[string]interface{}{ - common.ForwardedDataKeyActionType: string(common.ActionTypeSignOutConfirm), + common.ForwardedDataKeyActionType: string(common.ActionTypeConfirm), } resp, err := exec.Execute(ctx) diff --git a/frontend/apps/console/src/features/flows/components/resource-property-panel/__tests__/CommonResourceProperties.test.tsx b/frontend/apps/console/src/features/flows/components/resource-property-panel/__tests__/CommonResourceProperties.test.tsx index 0c3166d2e8..a4d0737b33 100644 --- a/frontend/apps/console/src/features/flows/components/resource-property-panel/__tests__/CommonResourceProperties.test.tsx +++ b/frontend/apps/console/src/features/flows/components/resource-property-panel/__tests__/CommonResourceProperties.test.tsx @@ -95,7 +95,7 @@ describe('CommonResourceProperties', () => { -