Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/admin/spam_logs/_spam_log.html.haml')
-rw-r--r--app/views/admin/spam_logs/_spam_log.html.haml16
1 files changed, 14 insertions, 2 deletions
diff --git a/app/views/admin/spam_logs/_spam_log.html.haml b/app/views/admin/spam_logs/_spam_log.html.haml
index 6aed8508a6a..878692438d4 100644
--- a/app/views/admin/spam_logs/_spam_log.html.haml
+++ b/app/views/admin/spam_logs/_spam_log.html.haml
@@ -29,7 +29,7 @@
variant: :danger,
method: :delete,
href: admin_spam_log_path(spam_log, remove_user: true),
- button_options: { data: { confirm: _("USER %{user_name} WILL BE REMOVED! Are you sure?") % { user_name: user.name }, confirm_btn_variant: 'danger' }, aria: { label: _('Remove user') } }) do
+ button_options: { data: { confirm: _("User %{user_name} will be removed! Are you sure?") % { user_name: user.name }, confirm_btn_variant: 'danger' }, aria: { label: _('Remove user') } }) do
= _('Remove user')
%td
-# TODO: Remove conditonal once spamcheck supports this https://gitlab.com/gitlab-com/gl-security/engineering-and-research/automation-team/spam/spamcheck/-/issues/190
@@ -48,11 +48,23 @@
= render Pajamas::ButtonComponent.new(size: :small,
method: :put,
href: block_admin_user_path(user),
- button_options: { class: 'gl-mb-3', data: {confirm: _('USER WILL BE BLOCKED! Are you sure?')} }) do
+ button_options: { class: 'gl-mb-3', data: {confirm: _('User will be blocked! Are you sure?')} }) do
= _('Block user')
- else
= render Pajamas::ButtonComponent.new(size: :small, button_options: { class: 'disabled gl-mb-3'}) do
= _("Already blocked")
+ - if user && !user.trusted?
+ = render Pajamas::ButtonComponent.new(size: :small,
+ method: :put,
+ href: trust_admin_user_path(user),
+ button_options: { class: 'gl-mb-3', data: {confirm: _('User will be allowed to create possible spam! Are you sure?')} }) do
+ = _('Trust user')
+ - else
+ = render Pajamas::ButtonComponent.new(size: :small,
+ method: :put,
+ href: untrust_admin_user_path(user),
+ button_options: { class: 'gl-mb-3', data: {confirm: _('User will not be allowed to create possible spam! Are you sure?')} }) do
+ = _('Untrust user')
= render Pajamas::ButtonComponent.new(size: :small,
method: :delete,
href: [:admin, spam_log],