mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-11 19:07:30 +00:00
fix: change to repository event types and removed unused code (#3386)
* fix: change to repository event types and removed unused code * some fixes * remove unused code
This commit is contained in:
@@ -1,18 +1,16 @@
|
||||
package model
|
||||
|
||||
import (
|
||||
"github.com/caos/zitadel/internal/domain"
|
||||
caos_errors "github.com/caos/zitadel/internal/errors"
|
||||
|
||||
"time"
|
||||
|
||||
req_model "github.com/caos/zitadel/internal/auth_request/model"
|
||||
"github.com/caos/zitadel/internal/domain"
|
||||
caos_errors "github.com/caos/zitadel/internal/errors"
|
||||
)
|
||||
|
||||
type UserSessionView struct {
|
||||
CreationDate time.Time
|
||||
ChangeDate time.Time
|
||||
State req_model.UserSessionState
|
||||
State domain.UserSessionState
|
||||
ResourceOwner string
|
||||
UserAgentID string
|
||||
UserID string
|
||||
@@ -26,9 +24,9 @@ type UserSessionView struct {
|
||||
PasswordlessVerification time.Time
|
||||
ExternalLoginVerification time.Time
|
||||
SecondFactorVerification time.Time
|
||||
SecondFactorVerificationType req_model.MFAType
|
||||
SecondFactorVerificationType domain.MFAType
|
||||
MultiFactorVerification time.Time
|
||||
MultiFactorVerificationType req_model.MFAType
|
||||
MultiFactorVerificationType domain.MFAType
|
||||
Sequence uint64
|
||||
}
|
||||
|
||||
|
@@ -5,15 +5,13 @@ import (
|
||||
"net/url"
|
||||
"time"
|
||||
|
||||
"github.com/caos/zitadel/internal/domain"
|
||||
"github.com/caos/zitadel/internal/static"
|
||||
|
||||
"golang.org/x/text/language"
|
||||
|
||||
req_model "github.com/caos/zitadel/internal/auth_request/model"
|
||||
"github.com/caos/zitadel/internal/domain"
|
||||
"github.com/caos/zitadel/internal/errors"
|
||||
"github.com/caos/zitadel/internal/eventstore/v1/models"
|
||||
iam_model "github.com/caos/zitadel/internal/iam/model"
|
||||
"github.com/caos/zitadel/internal/static"
|
||||
)
|
||||
|
||||
type UserView struct {
|
||||
@@ -58,7 +56,7 @@ type HumanView struct {
|
||||
OTPState MFAState
|
||||
U2FTokens []*WebAuthNView
|
||||
PasswordlessTokens []*WebAuthNView
|
||||
MFAMaxSetUp req_model.MFALevel
|
||||
MFAMaxSetUp domain.MFALevel
|
||||
MFAInitSkipped time.Time
|
||||
InitRequired bool
|
||||
PasswordlessInitRequired bool
|
||||
@@ -226,9 +224,9 @@ func (u *UserView) HasRequiredOrgMFALevel(policy *iam_model.LoginPolicyView) boo
|
||||
return true
|
||||
}
|
||||
switch u.MFAMaxSetUp {
|
||||
case req_model.MFALevelSecondFactor:
|
||||
case domain.MFALevelSecondFactor:
|
||||
return policy.HasSecondFactors()
|
||||
case req_model.MFALevelMultiFactor:
|
||||
case domain.MFALevelMultiFactor:
|
||||
return policy.HasMultiFactors()
|
||||
default:
|
||||
return false
|
||||
|
Reference in New Issue
Block a user