diff options
author | James Edwards-Jones <jedwardsjones@gitlab.com> | 2018-12-04 10:31:11 +0000 |
---|---|---|
committer | James Edwards-Jones <jedwardsjones@gitlab.com> | 2018-12-04 15:14:34 +0000 |
commit | 5978b98c5f50bf0a2f9ffb14d950d9a93b14ca4b (patch) | |
tree | e41663af7cc2c82f564acf117c8490d789aa3b5c /app/helpers/auth_helper.rb | |
parent | 8cd5004b350ef342f66956c11272dad1328f6526 (diff) | |
download | gitlab-ce-5978b98c5f50bf0a2f9ffb14d950d9a93b14ca4b.tar.gz |
Backport GroupSAML unlink changes
- Improves spacing between account buttons on Profile
- AccountsController#show uses locals instead of instance variables
- New `display_providers_on_profile?` helper method
- Adds `render_if_exists` for GroupSAMl unlink buttons
See: https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/8682
Diffstat (limited to 'app/helpers/auth_helper.rb')
-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 44f85e9c0f8..654fb9d9987 100644 --- a/app/helpers/auth_helper.rb +++ b/app/helpers/auth_helper.rb @@ -57,6 +57,10 @@ module AuthHelper auth_providers.reject { |provider| form_based_provider?(provider) } end + def display_providers_on_profile? + button_based_providers.any? + end + def providers_for_base_controller auth_providers.reject { |provider| LDAP_PROVIDER === provider } end |