mirror of
https://github.com/zitadel/zitadel.git
synced 2025-12-06 14:42:26 +00:00
fix: use correct the userID column name in permissions v2 check (#10467)
# Which Problems Are Solved
When `Permission Check V2` is enabled, calls to the `ListPasskeys` and
`ListAuthenticationFactors` APIs fail with the following error:
```
ERROR: missing FROM-clause entry for table "users14"
```
# How the Problems Are Solved
By using the right UserID column
(`projections.user_auth_methods5.user_id`) in the permission clause in
the `userAuthMethod` query
# Additional Changes
N/A
# Additional Context
- Closes #10386
(cherry picked from commit 45cc6e9bb1)
This commit is contained in:
committed by
Livio Spring
parent
bd6d4e35d4
commit
55dbc74cb3
@@ -112,7 +112,7 @@ func userAuthMethodPermissionCheckV2(ctx context.Context, query sq.SelectBuilder
|
||||
ctx,
|
||||
UserAuthMethodColumnResourceOwner,
|
||||
domain.PermissionUserRead,
|
||||
OwnedRowsPermissionOption(UserIDCol),
|
||||
OwnedRowsPermissionOption(UserAuthMethodColumnUserID),
|
||||
)
|
||||
return query.JoinClause(join, args...)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user