mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-26 04:05:40 +01:00
Log warning message when current user is freeze (#18937)
Signed-off-by: stonezdj <daojunz@vmware.com> Co-authored-by: Wang Yan <wangyan@vmware.com>
This commit is contained in:
parent
d745ad9175
commit
82ee5295ea
@ -155,7 +155,7 @@ func Login(ctx context.Context, m models.AuthModel) (*models.User, error) {
|
|||||||
user, err := authenticator.Authenticate(ctx, m)
|
user, err := authenticator.Authenticate(ctx, m)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
if _, ok = err.(ErrAuth); ok {
|
if _, ok = err.(ErrAuth); ok {
|
||||||
log.Debugf("Login failed, locking %s, and sleep for %v", m.Principal, frozenTime)
|
log.Warningf("Login failed, locking %s, and sleep for %v", m.Principal, frozenTime)
|
||||||
lock.Lock(m.Principal)
|
lock.Lock(m.Principal)
|
||||||
time.Sleep(frozenTime)
|
time.Sleep(frozenTime)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user