summaryrefslogtreecommitdiff
path: root/app/controllers
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/application_controller.rb2
-rw-r--r--app/controllers/concerns/snippets_actions.rb6
-rw-r--r--app/controllers/ldap/omniauth_callbacks_controller.rb8
-rw-r--r--app/controllers/projects/releases_controller.rb2
-rw-r--r--app/controllers/sessions_controller.rb4
5 files changed, 11 insertions, 11 deletions
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb
index 8cb8fd6dd4c..3c03c387dba 100644
--- a/app/controllers/application_controller.rb
+++ b/app/controllers/application_controller.rb
@@ -307,7 +307,7 @@ class ApplicationController < ActionController::Base
if current_user && current_user.requires_ldap_check?
return unless current_user.try_obtain_ldap_lease
- unless Gitlab::Auth::LDAP::Access.allowed?(current_user)
+ unless Gitlab::Auth::Ldap::Access.allowed?(current_user)
sign_out current_user
flash[:alert] = _("Access denied for your LDAP account.")
redirect_to new_user_session_path
diff --git a/app/controllers/concerns/snippets_actions.rb b/app/controllers/concerns/snippets_actions.rb
index f80e891a558..a18cdd58abb 100644
--- a/app/controllers/concerns/snippets_actions.rb
+++ b/app/controllers/concerns/snippets_actions.rb
@@ -30,9 +30,9 @@ module SnippetsActions
end
def check_repository_error
- repository_error = snippet.errors.delete(:repository)
+ repository_errors = Array(snippet.errors.delete(:repository))
- flash.now[:alert] = repository_error if repository_error
- recaptcha_check_with_fallback(repository_error.nil?) { render :edit }
+ flash.now[:alert] = repository_errors.first if repository_errors.present?
+ recaptcha_check_with_fallback(repository_errors.empty?) { render :edit }
end
end
diff --git a/app/controllers/ldap/omniauth_callbacks_controller.rb b/app/controllers/ldap/omniauth_callbacks_controller.rb
index 71a88bf3395..8e4d8f3d21b 100644
--- a/app/controllers/ldap/omniauth_callbacks_controller.rb
+++ b/app/controllers/ldap/omniauth_callbacks_controller.rb
@@ -4,9 +4,9 @@ class Ldap::OmniauthCallbacksController < OmniauthCallbacksController
extend ::Gitlab::Utils::Override
def self.define_providers!
- return unless Gitlab::Auth::LDAP::Config.sign_in_enabled?
+ return unless Gitlab::Auth::Ldap::Config.sign_in_enabled?
- Gitlab::Auth::LDAP::Config.available_servers.each do |server|
+ Gitlab::Auth::Ldap::Config.available_servers.each do |server|
alias_method server['provider_name'], :ldap
end
end
@@ -14,9 +14,9 @@ class Ldap::OmniauthCallbacksController < OmniauthCallbacksController
# We only find ourselves here
# if the authentication to LDAP was successful.
def ldap
- return unless Gitlab::Auth::LDAP::Config.sign_in_enabled?
+ return unless Gitlab::Auth::Ldap::Config.sign_in_enabled?
- sign_in_user_flow(Gitlab::Auth::LDAP::User)
+ sign_in_user_flow(Gitlab::Auth::Ldap::User)
end
define_providers!
diff --git a/app/controllers/projects/releases_controller.rb b/app/controllers/projects/releases_controller.rb
index d1f4b2653c5..7d6b38dd243 100644
--- a/app/controllers/projects/releases_controller.rb
+++ b/app/controllers/projects/releases_controller.rb
@@ -6,7 +6,7 @@ class Projects::ReleasesController < Projects::ApplicationController
before_action :release, only: %i[edit show update downloads]
before_action :authorize_read_release!
before_action do
- push_frontend_feature_flag(:release_issue_summary, project)
+ push_frontend_feature_flag(:release_issue_summary, project, default_enabled: true)
push_frontend_feature_flag(:release_evidence_collection, project, default_enabled: true)
push_frontend_feature_flag(:release_show_page, project, default_enabled: true)
end
diff --git a/app/controllers/sessions_controller.rb b/app/controllers/sessions_controller.rb
index 01c23ce9db7..2d1c1eeeea0 100644
--- a/app/controllers/sessions_controller.rb
+++ b/app/controllers/sessions_controller.rb
@@ -273,8 +273,8 @@ class SessionsController < Devise::SessionsController
def ldap_servers
@ldap_servers ||= begin
- if Gitlab::Auth::LDAP::Config.sign_in_enabled?
- Gitlab::Auth::LDAP::Config.available_servers
+ if Gitlab::Auth::Ldap::Config.sign_in_enabled?
+ Gitlab::Auth::Ldap::Config.available_servers
else
[]
end