Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-09-19 12:10:17 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-09-19 12:10:17 +0300
commit236caf4b92c8cc8b00dcacf81bb9e1ec1f798370 (patch)
treebcb67ec12f45e98081f593f9a6266ee33993bf02 /app/controllers
parent8b13b280f53bc4895c2e92b7dae7b23a95480104 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/application_controller.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb
index ef489a65575..7c69f43fa3d 100644
--- a/app/controllers/application_controller.rb
+++ b/app/controllers/application_controller.rb
@@ -343,9 +343,12 @@ class ApplicationController < ActionController::Base
end
def check_password_expiration
- return if session[:impersonator_id] || !current_user&.allow_password_authentication?
+ return if session[:impersonator_id]
+ return if current_user.nil?
- redirect_to new_profile_password_path if current_user&.password_expired?
+ if current_user.password_expired? && current_user.allow_password_authentication?
+ redirect_to new_profile_password_path
+ end
end
def active_user_check