diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-10-21 10:08:36 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-10-21 10:08:36 +0300 |
commit | 48aff82709769b098321c738f3444b9bdaa694c6 (patch) | |
tree | e00c7c43e2d9b603a5a6af576b1685e400410dee /app/views/admin/users/show.html.haml | |
parent | 879f5329ee916a948223f8f43d77fba4da6cd028 (diff) |
Add latest changes from gitlab-org/gitlab@13-5-stable-eev13.5.0-rc42
Diffstat (limited to 'app/views/admin/users/show.html.haml')
-rw-r--r-- | app/views/admin/users/show.html.haml | 84 |
1 files changed, 40 insertions, 44 deletions
diff --git a/app/views/admin/users/show.html.haml b/app/views/admin/users/show.html.haml index a08c29714e0..9c6f151a6b1 100644 --- a/app/views/admin/users/show.html.haml +++ b/app/views/admin/users/show.html.haml @@ -54,7 +54,7 @@ %strong{ class: @user.two_factor_enabled? ? 'cgreen' : 'cred' } - if @user.two_factor_enabled? Enabled - = link_to 'Disable', disable_two_factor_admin_user_path(@user), data: {confirm: 'Are you sure?'}, method: :patch, class: 'btn gl-button btn-sm btn-remove float-right', title: 'Disable Two-factor Authentication' + = link_to 'Disable', disable_two_factor_admin_user_path(@user), data: {confirm: 'Are you sure?'}, method: :patch, class: 'btn gl-button btn-sm btn-danger float-right', title: 'Disable Two-factor Authentication' - else Disabled @@ -137,7 +137,7 @@ .col-md-6 - unless @user == current_user - - unless @user.confirmed? + - if can_force_email_confirmation?(@user) .card.border-info .card-header.bg-info.text-white Confirm user @@ -150,50 +150,46 @@ = render 'admin/users/user_detail_note' - - if @user.deactivated? - .card.border-info - .card-header.bg-info.text-white - Reactivate this user - .card-body - = render partial: 'admin/users/user_activation_effects' - %br - = link_to 'Activate user', activate_admin_user_path(@user), method: :put, class: "btn gl-button btn-info", data: { confirm: 'Are you sure?' } - - elsif @user.can_be_deactivated? - .card.border-warning - .card-header.bg-warning.text-white - Deactivate this user - .card-body - = render partial: 'admin/users/user_deactivation_effects' - %br - %button.btn.gl-button.btn-warning{ data: { 'gl-modal-action': 'deactivate', - content: 'You can always re-activate their account, their data will remain intact.', - url: deactivate_admin_user_path(@user), - username: sanitize_name(@user.name) } } - = s_('AdminUsers|Deactivate user') + - unless @user.internal? + - if @user.deactivated? + .card.border-info + .card-header.bg-info.text-white + Reactivate this user + .card-body + = render partial: 'admin/users/user_activation_effects' + %br + = link_to 'Activate user', activate_admin_user_path(@user), method: :put, class: "btn gl-button btn-info", data: { confirm: 'Are you sure?' } + - elsif @user.can_be_deactivated? + .card.border-warning + .card-header.bg-warning.text-white + Deactivate this user + .card-body + = render partial: 'admin/users/user_deactivation_effects' + %br + %button.btn.gl-button.btn-warning{ data: { 'gl-modal-action': 'deactivate', + content: 'You can always re-activate their account, their data will remain intact.', + url: deactivate_admin_user_path(@user), + username: sanitize_name(@user.name) } } + = s_('AdminUsers|Deactivate user') - if @user.blocked? - .card.border-info - .card-header.bg-info.text-white - This user is blocked - .card-body - %p A blocked user cannot: - %ul - %li Log in - %li Access Git repositories - %br - = link_to 'Unblock user', unblock_admin_user_path(@user), method: :put, class: "btn gl-button btn-info", data: { confirm: 'Are you sure?' } - - else - .card.border-warning - .card-header.bg-warning.text-white - Block this user - .card-body - = render partial: 'admin/users/user_block_effects' - %br - %button.btn.gl-button.btn-warning{ data: { 'gl-modal-action': 'block', - content: 'You can always unblock their account, their data will remain intact.', - url: block_admin_user_path(@user), - username: sanitize_name(@user.name) } } - = s_('AdminUsers|Block user') + - if @user.blocked_pending_approval? + = render 'admin/users/approve_user', user: @user + = render 'admin/users/block_user', user: @user + - else + .card.border-info + .card-header.gl-bg-blue-500.gl-text-white + This user is blocked + .card-body + %p A blocked user cannot: + %ul + %li Log in + %li Access Git repositories + %br + = link_to 'Unblock user', unblock_admin_user_path(@user), method: :put, class: "btn gl-button btn-info", data: { confirm: s_('AdminUsers|Are you sure?') } + - elsif !@user.internal? + = render 'admin/users/block_user', user: @user + - if @user.access_locked? .card.border-info .card-header.bg-info.text-white |