mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-27 12:46:03 +01:00
Add ensure settings when to search user in auth proxy
This issue is regresssion that introduced by f92bc8076d (diff-42381e6df5f17ebd3d9165a325d5d8f4)
, the a.ensure() was removed from SearchUser(), which leads to the alwaysonboard cannot be updated.
Signed-off-by: wang yan <wangyan@vmware.com>
This commit is contained in:
parent
7b7f7a920a
commit
15ca9bfb81
@ -104,6 +104,10 @@ func (a *Auth) PostAuthenticate(u *models.User) error {
|
|||||||
// SearchUser returns nil as authproxy does not have such capability.
|
// SearchUser returns nil as authproxy does not have such capability.
|
||||||
// When AlwaysOnboard is set it always return the default model.
|
// When AlwaysOnboard is set it always return the default model.
|
||||||
func (a *Auth) SearchUser(username string) (*models.User, error) {
|
func (a *Auth) SearchUser(username string) (*models.User, error) {
|
||||||
|
err := a.ensure()
|
||||||
|
if err != nil {
|
||||||
|
log.Warningf("Failed to refresh configuration for HTTP Auth Proxy Authenticator, error: %v, the default settings will be used", err)
|
||||||
|
}
|
||||||
var u *models.User
|
var u *models.User
|
||||||
if a.AlwaysOnboard {
|
if a.AlwaysOnboard {
|
||||||
u = &models.User{Username: username}
|
u = &models.User{Username: username}
|
||||||
|
Loading…
Reference in New Issue
Block a user