summaryrefslogtreecommitdiff
path: root/app/views/admin/users/_access_levels.html.haml
diff options
context:
space:
mode:
authorDouwe Maan <douwe@selenight.nl>2017-02-06 17:19:37 -0600
committerDouwe Maan <douwe@selenight.nl>2017-02-06 17:19:37 -0600
commit46dff6910d2f618222e4213dca55ba68b5b66984 (patch)
tree4d34f8f3d530d4d82841af383f04bd94b6cfaaa9 /app/views/admin/users/_access_levels.html.haml
parent426680def4bdeb7c6b37d8a0538fc73c39942495 (diff)
downloadgitlab-ce-46dff6910d2f618222e4213dca55ba68b5b66984.tar.gz
More backport
Diffstat (limited to 'app/views/admin/users/_access_levels.html.haml')
-rw-r--r--app/views/admin/users/_access_levels.html.haml17
1 files changed, 13 insertions, 4 deletions
diff --git a/app/views/admin/users/_access_levels.html.haml b/app/views/admin/users/_access_levels.html.haml
index 18fdb1435a9..7855239dfe5 100644
--- a/app/views/admin/users/_access_levels.html.haml
+++ b/app/views/admin/users/_access_levels.html.haml
@@ -11,18 +11,27 @@
.form-group
= f.label :access_level, class: 'control-label'
.col-sm-10
- = f.radio_button :access_level, :regular, disabled: (current_user == @user && @user.is_admin?)
+ - editing_current_user = (current_user == @user)
+
+ = f.radio_button :access_level, :regular, disabled: editing_current_user
= label_tag :regular do
Regular
%p.light
Regular users have access to their groups and projects
- = f.radio_button :access_level, :admin
+
+ = f.radio_button :access_level, :admin, disabled: editing_current_user
= label_tag :admin do
Admin
%p.light
Administrators have access to all groups, projects and users and can manage all features in this installation
+ - if editing_current_user
+ %p.light
+ You cannot remove your own admin rights.
.form-group
= f.label :external, class: 'control-label'
- .col-sm-10= f.check_box :external
- .col-sm-10 External users cannot see internal or private projects unless access is explicitly granted. Also, external users cannot create projects or groups.
+ .col-sm-10
+ = f.check_box :external do
+ External
+ %p.light
+ External users cannot see internal or private projects unless access is explicitly granted. Also, external users cannot create projects or groups.