feat(users/v2): return prompt information (#9255)

# Which Problems Are Solved

Add the ability to update the timestamp when MFA initialization was last
skipped.
Get User By ID now also returns the timestamps when MFA setup was last
skipped.

# How the Problems Are Solved

- Add a `HumanMFAInitSkipped` method to the `users/v2` API.
- MFA skipped was already projected in the `auth.users3` table. In this
PR the same column is added to the users projection. Event handling is
kept the same as in the `UserView`:

<details>


62804ca45f/internal/user/repository/view/model/user.go (L243-L377)

</details>

# Additional Changes

- none

# Additional Context

- Closes https://github.com/zitadel/zitadel/issues/9197
This commit is contained in:
Tim Möhlmann
2025-01-29 17:12:31 +02:00
committed by GitHub
parent df8bac8a28
commit b6841251b1
28 changed files with 673 additions and 364 deletions

View File

@@ -1,6 +1,6 @@
with usr as (
select u.id, u.creation_date, u.change_date, u.sequence, u.state, u.resource_owner, u.username, n.login_name as preferred_login_name
from projections.users13 u
from projections.users14 u
left join projections.login_names3 n on u.id = n.user_id and u.instance_id = n.instance_id
where u.id = $1 and u.state = 1 -- only allow active users
and u.instance_id = $2
@@ -9,7 +9,7 @@ with usr as (
human as (
select $1 as user_id, row_to_json(r) as human from (
select first_name, last_name, nick_name, display_name, avatar_key, preferred_language, gender, email, is_email_verified, phone, is_phone_verified
from projections.users13_humans
from projections.users14_humans
where user_id = $1
and instance_id = $2
) r
@@ -17,7 +17,7 @@ human as (
machine as (
select $1 as user_id, row_to_json(r) as machine from (
select name, description
from projections.users13_machines
from projections.users14_machines
where user_id = $1
and instance_id = $2
) r