Search code examples
gitlabgitlab-api

Disable password reset on login when changing password through Gitlab API


I've configured Gitlab CE 10.6 with OmniAuth and a CAS server that authenticates against two Active Directories and a users db. The login process is working fine to make the automatic signup, etc... now, i've been asked to synchronize the password from my CAS server with the gitlab password to avoid this extra step for the user, I am updating the user password each time the user uses the CAS authentication, i am doing this using a rest client on the CAS server consuming Gitlab Rest Api, the problem is each time i change the password it asks the user to setup a new password, Is there any way i can disable this feature in the configuration?

Thank you in advance!


Solution

  • I solved it removing this line from users.rb v4 API

    user_params[:password_expires_at] = Time.now if user_params[:password].present?