summaryrefslogtreecommitdiff
path: root/app/helpers/users_helper.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-11-25 00:09:24 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-11-25 00:09:24 +0000
commit4fc6f62c1631f0f988c08496ef57360bf331cd9b (patch)
tree6cc259a0ba839c0c633de3e6a7edb83bd499ddad /app/helpers/users_helper.rb
parentc019f485556acef2baa8e1886559e252710361a0 (diff)
downloadgitlab-ce-4fc6f62c1631f0f988c08496ef57360bf331cd9b.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/helpers/users_helper.rb')
-rw-r--r--app/helpers/users_helper.rb29
1 files changed, 29 insertions, 0 deletions
diff --git a/app/helpers/users_helper.rb b/app/helpers/users_helper.rb
index fbd95094fbd..1774e137f8f 100644
--- a/app/helpers/users_helper.rb
+++ b/app/helpers/users_helper.rb
@@ -149,6 +149,35 @@ module UsersHelper
header + list
end
+ def user_deactivation_data(user, message)
+ {
+ path: deactivate_admin_user_path(user),
+ method: 'put',
+ modal_attributes: {
+ title: s_('AdminUsers|Deactivate user %{username}?') % { username: sanitize_name(user.name) },
+ messageHtml: message,
+ okVariant: 'warning',
+ okTitle: s_('AdminUsers|Deactivate')
+ }.to_json
+ }
+ end
+
+ def user_deactivation_effects
+ header = tag.p s_('AdminUsers|Deactivating a user has the following effects:')
+
+ list = tag.ul do
+ concat tag.li s_('AdminUsers|The user will be logged out')
+ concat tag.li s_('AdminUsers|The user will not be able to access git repositories')
+ concat tag.li s_('AdminUsers|The user will not be able to access the API')
+ concat tag.li s_('AdminUsers|The user will not receive any notifications')
+ concat tag.li s_('AdminUsers|The user will not be able to use slash commands')
+ concat tag.li s_('AdminUsers|When the user logs back in, their account will reactivate as a fully active account')
+ concat tag.li s_('AdminUsers|Personal projects, group and user history will be left intact')
+ end
+
+ header + list
+ end
+
private
def blocked_user_badge(user)