This commit is contained in:
Elio Bischof
2022-07-18 10:58:43 +02:00
parent dde0266192
commit 5fd90efab1

View File

@@ -17,6 +17,7 @@ import (
func execute(ctx context.Context, cmd *command.Commands, cfg E2EConfig, users []userData) error {
ctx = authz.WithInstanceID(ctx, cfg.InstanceID)
ctx = authz.WithRequestedDomain(ctx, "localhost")
orgOwner := newHuman(users[0])
@@ -41,6 +42,11 @@ func execute(ctx context.Context, cmd *command.Commands, cfg E2EConfig, users []
return err
}
// skip mfa
if err = cmd.HumanSkipMFAInit(ctx, orgOwnerID, org.ResourceOwner); err != nil {
return err
}
sa, err := cmd.AddMachine(ctx, org.ResourceOwner, &domain.Machine{
Username: "e2e",
Name: "e2e",
@@ -91,6 +97,11 @@ func execute(ctx context.Context, cmd *command.Commands, cfg E2EConfig, users []
return err
}
// skip mfa
if err = cmd.HumanSkipMFAInit(ctx, orgOwnerID, org.ResourceOwner); err != nil {
return err
}
if user.role != "" {
if _, err = cmd.AddOrgMember(ctx, org.ResourceOwner, createdHuman.ID, user.role); err != nil {
return err