summaryrefslogtreecommitdiff
path: root/app/views/admin
diff options
context:
space:
mode:
authorJose Ivan Vargas <jvargas@gitlab.com>2017-02-06 15:38:08 -0600
committerJose Ivan Vargas <jvargas@gitlab.com>2017-02-06 16:17:46 -0600
commit426680def4bdeb7c6b37d8a0538fc73c39942495 (patch)
tree573425c39c4391f1c533801bcf9cbecfe3a4e740 /app/views/admin
parent54ff60f7064b4287ce3727c9a6f373a77b03ef5f (diff)
downloadgitlab-ce-426680def4bdeb7c6b37d8a0538fc73c39942495.tar.gz
Backport of the frontend view, including tests
Diffstat (limited to 'app/views/admin')
-rw-r--r--app/views/admin/users/_access_levels.html.haml18
1 files changed, 12 insertions, 6 deletions
diff --git a/app/views/admin/users/_access_levels.html.haml b/app/views/admin/users/_access_levels.html.haml
index 81337db3aae..18fdb1435a9 100644
--- a/app/views/admin/users/_access_levels.html.haml
+++ b/app/views/admin/users/_access_levels.html.haml
@@ -9,12 +9,18 @@
.col-sm-10= f.check_box :can_create_group
.form-group
- = f.label :admin, class: 'control-label'
- - if current_user == @user
- .col-sm-10= f.check_box :admin, disabled: true
- .col-sm-10 You cannot remove your own admin rights.
- - else
- .col-sm-10= f.check_box :admin
+ = f.label :access_level, class: 'control-label'
+ .col-sm-10
+ = f.radio_button :access_level, :regular, disabled: (current_user == @user && @user.is_admin?)
+ = label_tag :regular do
+ Regular
+ %p.light
+ Regular users have access to their groups and projects
+ = f.radio_button :access_level, :admin
+ = label_tag :admin do
+ Admin
+ %p.light
+ Administrators have access to all groups, projects and users and can manage all features in this installation
.form-group
= f.label :external, class: 'control-label'