fix: allow webauthn checks for users of other orgs (#6915)

(cherry picked from commit 3bc9a60986)
This commit is contained in:
Livio Spring 2023-11-14 11:42:39 +02:00
parent 5af3298414
commit 3001d03bca
No known key found for this signature in database
GPG Key ID: 26BB1C2FA5952CF0
2 changed files with 3 additions and 3 deletions

View File

@ -267,7 +267,7 @@ func (s *SessionCommands) gethumanWriteModel(ctx context.Context) (*HumanWriteMo
if s.sessionWriteModel.UserID == "" { if s.sessionWriteModel.UserID == "" {
return nil, caos_errs.ThrowPreconditionFailed(nil, "COMMAND-eeR2e", "Errors.User.UserIDMissing") return nil, caos_errs.ThrowPreconditionFailed(nil, "COMMAND-eeR2e", "Errors.User.UserIDMissing")
} }
humanWriteModel := NewHumanWriteModel(s.sessionWriteModel.UserID, s.sessionWriteModel.ResourceOwner) humanWriteModel := NewHumanWriteModel(s.sessionWriteModel.UserID, "")
err := s.eventstore.FilterToQueryReducer(ctx, humanWriteModel) err := s.eventstore.FilterToQueryReducer(ctx, humanWriteModel)
if err != nil { if err != nil {
return nil, err return nil, err

View File

@ -29,9 +29,9 @@ func (s *SessionCommands) getHumanWebAuthNTokens(ctx context.Context, userVerifi
} }
func (s *SessionCommands) getHumanWebAuthNTokenReadModel(ctx context.Context, userVerification domain.UserVerificationRequirement) (readModel HumanWebAuthNTokensReadModel, err error) { func (s *SessionCommands) getHumanWebAuthNTokenReadModel(ctx context.Context, userVerification domain.UserVerificationRequirement) (readModel HumanWebAuthNTokensReadModel, err error) {
readModel = NewHumanU2FTokensReadModel(s.sessionWriteModel.UserID, s.sessionWriteModel.ResourceOwner) readModel = NewHumanU2FTokensReadModel(s.sessionWriteModel.UserID, "")
if userVerification == domain.UserVerificationRequirementRequired { if userVerification == domain.UserVerificationRequirementRequired {
readModel = NewHumanPasswordlessTokensReadModel(s.sessionWriteModel.UserID, s.sessionWriteModel.ResourceOwner) readModel = NewHumanPasswordlessTokensReadModel(s.sessionWriteModel.UserID, "")
} }
err = s.eventstore.FilterToQueryReducer(ctx, readModel) err = s.eventstore.FilterToQueryReducer(ctx, readModel)
if err != nil { if err != nil {