mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-12 00:17:32 +00:00
refactor: cleanup unused code (#7130)
* refactor: drop unused code * refactor: drop unused code
This commit is contained in:
@@ -1,10 +1,5 @@
|
||||
package domain
|
||||
|
||||
type User interface {
|
||||
GetUsername() string
|
||||
GetState() UserState
|
||||
}
|
||||
|
||||
type UserState int32
|
||||
|
||||
const (
|
||||
@@ -19,10 +14,6 @@ const (
|
||||
userStateCount
|
||||
)
|
||||
|
||||
func (f UserState) Valid() bool {
|
||||
return f >= 0 && f < userStateCount
|
||||
}
|
||||
|
||||
func (s UserState) Exists() bool {
|
||||
return s != UserStateUnspecified && s != UserStateDeleted
|
||||
}
|
||||
@@ -40,10 +31,6 @@ const (
|
||||
userTypeCount
|
||||
)
|
||||
|
||||
func (f UserType) Valid() bool {
|
||||
return f >= 0 && f < userTypeCount
|
||||
}
|
||||
|
||||
type UserAuthMethodType int32
|
||||
|
||||
const (
|
||||
@@ -58,10 +45,6 @@ const (
|
||||
userAuthMethodTypeCount
|
||||
)
|
||||
|
||||
func (f UserAuthMethodType) Valid() bool {
|
||||
return f >= 0 && f < userAuthMethodTypeCount
|
||||
}
|
||||
|
||||
// HasMFA checks whether the user authenticated with multiple auth factors.
|
||||
// This can either be true if the list contains a [UserAuthMethodType] which by itself is MFA (e.g. [UserAuthMethodTypePasswordless])
|
||||
// or if multiple factors were used (e.g. [UserAuthMethodTypePassword] and [UserAuthMethodTypeU2F])
|
||||
|
Reference in New Issue
Block a user