mirror of
https://github.com/grafana/grafana.git
synced 2025-08-03 04:22:13 +08:00
Auth: Removal of conflicting users check upon creation (#89045)
fix: removal of check for conflicting users
This commit is contained in:
@ -1,8 +1,6 @@
|
||||
package user
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/grafana/grafana/pkg/services/auth/identity"
|
||||
@ -219,27 +217,6 @@ type CompleteEmailVerifyCommand struct {
|
||||
Code string
|
||||
}
|
||||
|
||||
type ErrCaseInsensitiveLoginConflict struct {
|
||||
Users []User
|
||||
}
|
||||
|
||||
func (e *ErrCaseInsensitiveLoginConflict) Unwrap() error {
|
||||
return ErrCaseInsensitive
|
||||
}
|
||||
|
||||
func (e *ErrCaseInsensitiveLoginConflict) Error() string {
|
||||
n := len(e.Users)
|
||||
|
||||
userStrings := make([]string, 0, n)
|
||||
for _, v := range e.Users {
|
||||
userStrings = append(userStrings, fmt.Sprintf("%s (email:%s, id:%d)", v.Login, v.Email, v.ID))
|
||||
}
|
||||
|
||||
return fmt.Sprintf(
|
||||
"Found a conflict in user login information. %d users already exist with either the same login or email: [%s].",
|
||||
n, strings.Join(userStrings, ", "))
|
||||
}
|
||||
|
||||
type Filter interface {
|
||||
WhereCondition() *WhereCondition
|
||||
InCondition() *InCondition
|
||||
|
Reference in New Issue
Block a user