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/controllers/profiles | |
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/controllers/profiles')
-rw-r--r-- | app/controllers/profiles/accounts_controller.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/app/controllers/profiles/accounts_controller.rb b/app/controllers/profiles/accounts_controller.rb index cb3180f4196..13660e27a27 100644 --- a/app/controllers/profiles/accounts_controller.rb +++ b/app/controllers/profiles/accounts_controller.rb @@ -4,7 +4,7 @@ class Profiles::AccountsController < Profiles::ApplicationController include AuthHelper def show - @user = current_user + render(locals: show_view_variables) end # rubocop: disable CodeReuse/ActiveRecord @@ -23,4 +23,10 @@ class Profiles::AccountsController < Profiles::ApplicationController redirect_to profile_account_path end # rubocop: enable CodeReuse/ActiveRecord + + private + + def show_view_variables + { user: current_user } + end end |