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:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-11-17 21:09:20 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-11-17 21:09:20 +0300
commitc663374b3d4d91780d07dd825be74bfbee552f45 (patch)
tree1c821b0950330e63cb008320d003fd020b0a11c6 /app/helpers/users_helper.rb
parent6535cf9c79362862c31ea7d26c61541b84db18d9 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/helpers/users_helper.rb')
-rw-r--r--app/helpers/users_helper.rb26
1 files changed, 26 insertions, 0 deletions
diff --git a/app/helpers/users_helper.rb b/app/helpers/users_helper.rb
index 2962a089064..7d4ab192f2f 100644
--- a/app/helpers/users_helper.rb
+++ b/app/helpers/users_helper.rb
@@ -110,6 +110,32 @@ module UsersHelper
!user.confirmed?
end
+ def user_block_data(user, message)
+ {
+ path: block_admin_user_path(user),
+ method: 'put',
+ modal_attributes: {
+ title: s_('AdminUsers|Block user %{username}?') % { username: sanitize_name(user.name) },
+ messageHtml: message,
+ okVariant: 'warning',
+ okTitle: s_('AdminUsers|Block')
+ }.to_json
+ }
+ end
+
+ def user_block_effects
+ header = tag.p s_('AdminUsers|Blocking user has the following effects:')
+
+ list = tag.ul do
+ concat tag.li s_('AdminUsers|User will not be able to login')
+ concat tag.li s_('AdminUsers|User will not be able to access git repositories')
+ concat tag.li s_('AdminUsers|Personal projects will be left')
+ concat tag.li s_('AdminUsers|Owned groups will be left')
+ end
+
+ header + list
+ end
+
private
def blocked_user_badge(user)