mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-11 21:07:31 +00:00
fix: user with state initial can only be deleted not deactivated (#3110)
This commit is contained in:
@@ -140,6 +140,10 @@ func isUserStateInactive(state domain.UserState) bool {
|
||||
return hasUserState(state, domain.UserStateInactive)
|
||||
}
|
||||
|
||||
func isUserStateInitial(state domain.UserState) bool {
|
||||
return hasUserState(state, domain.UserStateInitial)
|
||||
}
|
||||
|
||||
func hasUserState(check domain.UserState, states ...domain.UserState) bool {
|
||||
for _, state := range states {
|
||||
if check == state {
|
||||
|
Reference in New Issue
Block a user