Commit b8ecc996 authored by James Edwards-Jones's avatar James Edwards-Jones
Browse files

Replace @user with current_user on Account page

Previously we used @user, but this changed to local_assigns[:user]
so we could pass a second variable to the view from an EE module

Since we were already using current_user librally there it makes sense
to replace the remaining usages.

parent cd12a553e4ed
......@@ -27,6 +27,6 @@ def unlink
def show_view_variables
{ user: current_user }
- page_title "Account"
- @content_class = "limit-container-width" unless fluid_layout
- user = local_assigns.fetch(:user)
- if current_user.ldap_user?
......@@ -68,7 +67,7 @@
= s_('Profiles|Delete account')
- if user.can_be_removed? && can?(current_user, :destroy_user, user)
- if current_user.can_be_removed? && can?(current_user, :destroy_user, current_user)
= s_('Profiles|Deleting an account has the following effects:')
= render 'users/deletion_guidance', user: current_user
......@@ -81,10 +80,10 @@
confirm_with_password: ('true' if current_user.confirm_deletion_with_password?),
username: current_user.username } }
- else
- if user.solo_owned_groups.present?
- if current_user.solo_owned_groups.present?
= s_('Profiles|Your account is currently an owner in these groups:')
%strong=', ')
%strong=', ')
= s_('Profiles|You must transfer ownership or delete these groups before you can delete your account.')
- else
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment