Merge commit from fork

This commit is contained in:
Livio Spring
2026-02-25 06:34:17 +01:00
committed by GitHub
parent b2532e9666
commit 0261536243
3 changed files with 112 additions and 1 deletions
@@ -4016,6 +4016,56 @@ func TestServer_UpdateUserTypeHuman(t *testing.T) {
}
},
},
{
name: "verified email",
testCase: func(runId, userId string) testCase {
return testCase{
args: args{
OrgCTX,
&user.UpdateUserRequest{
UserId: userId,
UserType: &user.UpdateUserRequest_Human_{
Human: &user.UpdateUserRequest_Human{
Email: &user.SetHumanEmail{
Email: integration.Email(),
Verification: &user.SetHumanEmail_IsVerified{
IsVerified: true,
},
},
},
},
},
},
wantErr: false,
}
},
},
{
name: "verified email (self-management), error",
testCase: func(runId, userId string) testCase {
Instance.SetUserPassword(LoginCTX, userId, integration.UserPassword, false)
_, token, _, _ := Instance.CreatePasswordSession(t, LoginCTX, userId, integration.UserPassword)
return testCase{
args: args{
integration.WithAuthorizationToken(CTX, token),
&user.UpdateUserRequest{
UserId: userId,
UserType: &user.UpdateUserRequest_Human_{
Human: &user.UpdateUserRequest_Human{
Email: &user.SetHumanEmail{
Email: integration.Email(),
Verification: &user.SetHumanEmail_IsVerified{
IsVerified: true,
},
},
},
},
},
},
wantErr: true,
}
},
},
{
name: "password not complexity conform",
testCase: func(runId, userId string) testCase {