diff options
author | Douwe Maan <douwe@gitlab.com> | 2017-03-31 19:59:54 +0000 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2017-03-31 19:59:54 +0000 |
commit | b54acba8b732688c59fe2f38510c469dc86ee499 (patch) | |
tree | 8ecb84dc17633a7411e3d98c781ec7849f0901eb /app/helpers | |
parent | 5191285ccb548b50c2c01325832b99c8340807f8 (diff) | |
parent | b9adf92f3c96d5f24fa413944dff3b932740a613 (diff) | |
download | gitlab-ce-b54acba8b732688c59fe2f38510c469dc86ee499.tar.gz |
Merge branch '25556-prevent-users-from-disconnecting-gitlab-account-from-cas' into 'master'
Prevent users from disconnecting gitlab account from CAS
Closes #25556
See merge request !10282
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 |