mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-23 18:55:18 +01:00
Merge pull request #7869 from wy65701436/fix-auth-proxy
Add ensure settings when to search user in auth proxy
This commit is contained in:
commit
c924627d16
@ -104,6 +104,10 @@ func (a *Auth) PostAuthenticate(u *models.User) error {
|
||||
// SearchUser returns nil as authproxy does not have such capability.
|
||||
// When AlwaysOnboard is set it always return the default model.
|
||||
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
|
||||
if a.AlwaysOnboard {
|
||||
u = &models.User{Username: username}
|
||||
|
Loading…
Reference in New Issue
Block a user