diff options
author | James Edwards-Jones <jedwardsjones@gitlab.com> | 2018-12-04 13:31:11 +0300 |
---|---|---|
committer | James Edwards-Jones <jedwardsjones@gitlab.com> | 2018-12-04 18:14:34 +0300 |
commit | 5978b98c5f50bf0a2f9ffb14d950d9a93b14ca4b (patch) | |
tree | e41663af7cc2c82f564acf117c8490d789aa3b5c /app/controllers | |
parent | 8cd5004b350ef342f66956c11272dad1328f6526 (diff) |
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')
-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 |