summaryrefslogtreecommitdiff
path: root/app/controllers/application_controller.rb
diff options
context:
space:
mode:
authorRobin Bobbitt <ryehle@us.ibm.com>2017-06-27 14:02:09 -0400
committerRobin Bobbitt <ryehle@us.ibm.com>2017-07-13 10:08:27 -0400
commit672a68d3724bcae676d18244c85566e7d664a169 (patch)
tree0a80378a3d96290bda93db53bb231798f2a7ecdd /app/controllers/application_controller.rb
parent31ada792621f17ab7f4f7475405ddd1ec9e9673a (diff)
downloadgitlab-ce-672a68d3724bcae676d18244c85566e7d664a169.tar.gz
Fixes needed when GitLab sign-in is not enabled
When sign-in is disabled: - skip password expiration checks - prevent password reset requests - don’t show Password tab in User Settings - don’t allow login with username/password for Git over HTTP requests - render 404 on requests to Profiles::PasswordsController
Diffstat (limited to 'app/controllers/application_controller.rb')
-rw-r--r--app/controllers/application_controller.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb
index db7edbd619b..43462b13903 100644
--- a/app/controllers/application_controller.rb
+++ b/app/controllers/application_controller.rb
@@ -170,7 +170,7 @@ class ApplicationController < ActionController::Base
end
def check_password_expiration
- if current_user && current_user.password_expires_at && current_user.password_expires_at < Time.now && !current_user.ldap_user?
+ if current_user && current_user.password_expires_at && current_user.password_expires_at < Time.now && current_user.allow_password_authentication?
return redirect_to new_profile_password_path
end
end