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:
authorTiago Botelho <tiagonbotelho@hotmail.com>2017-03-28 13:33:51 +0300
committerTiago Botelho <tiagonbotelho@hotmail.com>2017-03-31 20:42:34 +0300
commitb9adf92f3c96d5f24fa413944dff3b932740a613 (patch)
treeebb38fe8bfadf720dc1fc4948f5f7fde3749ba2c /app/helpers
parent19a4403443ff6217e6a024667f8ef1eea2f38f4a (diff)
Prevent users from disconnecting gitlab account from CAS
Diffstat (limited to 'app/helpers')
-rw-r--r--app/helpers/auth_helper.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/helpers/auth_helper.rb b/app/helpers/auth_helper.rb
index 1ee6c1d3afa..101fe579da2 100644
--- a/app/helpers/auth_helper.rb
+++ b/app/helpers/auth_helper.rb
@@ -76,5 +76,9 @@ module AuthHelper
(current_user.otp_grace_period_started_at + current_application_settings.two_factor_grace_period.hours) < Time.current
end
+ def unlink_allowed?(provider)
+ %w(saml cas3).exclude?(provider.to_s)
+ end
+
extend self
end