diff --git a/src/Saas.SignupAdministration/Saas.SignupAdministration.Web/Services/OnboardingWorkflow.cs b/src/Saas.SignupAdministration/Saas.SignupAdministration.Web/Services/OnboardingWorkflow.cs index 2aca8c06..e8fa2d5e 100644 --- a/src/Saas.SignupAdministration/Saas.SignupAdministration.Web/Services/OnboardingWorkflow.cs +++ b/src/Saas.SignupAdministration/Saas.SignupAdministration.Web/Services/OnboardingWorkflow.cs @@ -1,4 +1,5 @@ -using Saas.SignupAdministration.Web.Services.StateMachine; +using Dawn; +using Saas.SignupAdministration.Web.Services.StateMachine; namespace Saas.SignupAdministration.Web.Services @@ -31,7 +32,7 @@ namespace Saas.SignupAdministration.Web.Services OnboardingWorkflowItem? item = _persistenceProvider.Retrieve(SR.OnboardingWorkflowItemKey); OnboardingWorkflowState? state = _persistenceProvider.Retrieve(SR.OnboardingWorkflowStateKey); - OnboardingWorkflowItem = (item is null) ? new() : item; + OnboardingWorkflowItem = (item is null) ? new(Guard.Argument(applicationUser?.NameIdentifier).NotNull().NotDefault().ToString()) : item; OnboardingWorkflowState = (state is null) ? new() : state; } diff --git a/src/Saas.SignupAdministration/Saas.SignupAdministration.Web/Services/OnboardingWorkflowItem.cs b/src/Saas.SignupAdministration/Saas.SignupAdministration.Web/Services/OnboardingWorkflowItem.cs index 1517b164..b793ea36 100644 --- a/src/Saas.SignupAdministration/Saas.SignupAdministration.Web/Services/OnboardingWorkflowItem.cs +++ b/src/Saas.SignupAdministration/Saas.SignupAdministration.Web/Services/OnboardingWorkflowItem.cs @@ -50,12 +50,18 @@ namespace Saas.SignupAdministration.Web.Services Initialize(); } + public OnboardingWorkflowItem(string userId) + { + Id = Guid.NewGuid(); + OnboardingWorkflowName = SR.OnboardingWorkflowName; + UserId = userId; + Created = DateTime.Now; + } + private void Initialize() { Id = Guid.NewGuid(); OnboardingWorkflowName = SR.OnboardingWorkflowName; - - // TODO: UserId needs to be replaced with value from SSO UserId = Guid.NewGuid().ToString(); Created = DateTime.Now; }