fix: add user info to context for set metadata in actions (#10426)

# Which Problems Are Solved

User information in the context is necessary through the addition of the
resource based API endpoints for user metadata, for the permission
check.

# How the Problems Are Solved

Add user information to the action execution to add metadata to users.

# Additional Changes

None

# Additional Context

Needs to be added to v4 releases, to provide the functionality to add
metadata through actions v1 and actions v2 functions.

Co-authored-by: Marco A. <[email protected]>
This commit is contained in:
Stefan Benz
2025-08-11 16:43:52 +02:00
committed by GitHub
co-authored by Marco A.
parent f13529b31f
commit 1579bbc8db
10 changed files with 32 additions and 11 deletions
+1 -1
View File
@@ -39,7 +39,7 @@ func (l *Login) handlePasswordCheck(w http.ResponseWriter, r *http.Request) {
metadata, actionErr := l.runPostInternalAuthenticationActions(authReq, r, authMethodPassword, err)
if err == nil && actionErr == nil && len(metadata) > 0 {
_, err = l.command.BulkSetUserMetadata(r.Context(), authReq.UserID, authReq.UserOrgID, metadata...)
err = l.bulkSetUserMetadata(r.Context(), authReq.UserID, authReq.UserOrgID, metadata)
} else if actionErr != nil && err == nil {
err = actionErr
}