diff options
author | Tiago Botelho <tiagonbotelho@hotmail.com> | 2017-03-28 11:33:51 +0100 |
---|---|---|
committer | Tiago Botelho <tiagonbotelho@hotmail.com> | 2017-03-31 18:42:34 +0100 |
commit | b9adf92f3c96d5f24fa413944dff3b932740a613 (patch) | |
tree | ebb38fe8bfadf720dc1fc4948f5f7fde3749ba2c /app/helpers | |
parent | 19a4403443ff6217e6a024667f8ef1eea2f38f4a (diff) | |
download | gitlab-ce-b9adf92f3c96d5f24fa413944dff3b932740a613.tar.gz |
Prevent users from disconnecting gitlab account from CAS
Diffstat (limited to 'app/helpers')
-rw-r--r-- | app/helpers/auth_helper.rb | 4 |
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 |