Support skip information reconfirm when using external IDP
Signed-off-by: hongming <hongming@kubesphere.io>
This commit is contained in:
@@ -58,6 +58,10 @@ func (a *EmailValidator) Handle(ctx context.Context, req admission.Request) admi
|
||||
}
|
||||
|
||||
func emailAlreadyExist(users v1alpha2.UserList, user *v1alpha2.User) bool {
|
||||
// empty email is allowed
|
||||
if user.Spec.Email == "" {
|
||||
return false
|
||||
}
|
||||
for _, exist := range users.Items {
|
||||
if exist.Spec.Email == user.Spec.Email && exist.Name != user.Name {
|
||||
return true
|
||||
|
||||
Reference in New Issue
Block a user