mirror of https://github.com/portainer/portainer
fix(authentication/ldap): fix an issue with authorizations not updated after ldap login (#3577)
parent
ad5f51964c
commit
e0d83db609
|
@ -79,6 +79,11 @@ func (handler *Handler) authenticateLDAP(w http.ResponseWriter, user *portainer.
|
||||||
log.Printf("Warning: unable to automatically add user into teams: %s\n", err.Error())
|
log.Printf("Warning: unable to automatically add user into teams: %s\n", err.Error())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
err = handler.AuthorizationService.UpdateUsersAuthorizations()
|
||||||
|
if err != nil {
|
||||||
|
return &httperror.HandlerError{http.StatusInternalServerError, "Unable to update user authorizations", err}
|
||||||
|
}
|
||||||
|
|
||||||
return handler.writeToken(w, user)
|
return handler.writeToken(w, user)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -175,6 +180,7 @@ func (handler *Handler) addUserIntoTeams(user *portainer.User, settings *portain
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue