mirror of
https://github.com/andwati/zitadel.git
synced 2026-10-24 00:02:15 +00:00
# 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]>
16 lines
483 B
Go
16 lines
483 B
Go
package login
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/zitadel/zitadel/internal/api/authz"
|
|
"github.com/zitadel/zitadel/internal/domain"
|
|
)
|
|
|
|
func (l *Login) bulkSetUserMetadata(ctx context.Context, userID, orgID string, metadata []*domain.Metadata) error {
|
|
// user context necessary due to permission check in command
|
|
userCtx := authz.SetCtxData(ctx, authz.CtxData{UserID: userID, OrgID: orgID})
|
|
_, err := l.command.BulkSetUserMetadata(userCtx, userID, orgID, metadata...)
|
|
return err
|
|
}
|