diff options
author | Timothy Andrew <mail@timothyandrew.net> | 2017-02-06 22:28:05 +0530 |
---|---|---|
committer | Timothy Andrew <mail@timothyandrew.net> | 2017-02-06 23:42:56 +0530 |
commit | 54ff60f7064b4287ce3727c9a6f373a77b03ef5f (patch) | |
tree | 06c733b4857a43d7d92d24803f1c7133abb5a8e9 /app/views/admin | |
parent | 2e0e2b22d65efddf21c03d8c0785281724675ece (diff) | |
download | gitlab-ce-54ff60f7064b4287ce3727c9a6f373a77b03ef5f.tar.gz |
Backport UI changes from gitlab-org/gitlab-ee!998
Diffstat (limited to 'app/views/admin')
-rw-r--r-- | app/views/admin/users/_access_levels.html.haml | 22 | ||||
-rw-r--r-- | app/views/admin/users/_form.html.haml | 23 |
2 files changed, 23 insertions, 22 deletions
diff --git a/app/views/admin/users/_access_levels.html.haml b/app/views/admin/users/_access_levels.html.haml new file mode 100644 index 00000000000..81337db3aae --- /dev/null +++ b/app/views/admin/users/_access_levels.html.haml @@ -0,0 +1,22 @@ +%fieldset + %legend Access + .form-group + = f.label :projects_limit, class: 'control-label' + .col-sm-10= f.number_field :projects_limit, min: 0, class: 'form-control' + + .form-group + = f.label :can_create_group, class: 'control-label' + .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 + + .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. diff --git a/app/views/admin/users/_form.html.haml b/app/views/admin/users/_form.html.haml index 3145212728f..e911af3f6f9 100644 --- a/app/views/admin/users/_form.html.haml +++ b/app/views/admin/users/_form.html.haml @@ -40,28 +40,7 @@ = f.label :password_confirmation, class: 'control-label' .col-sm-10= f.password_field :password_confirmation, disabled: f.object.force_random_password, class: 'form-control' - %fieldset - %legend Access - .form-group - = f.label :projects_limit, class: 'control-label' - .col-sm-10= f.number_field :projects_limit, min: 0, class: 'form-control' - - .form-group - = f.label :can_create_group, class: 'control-label' - .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 - - .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. + = render partial: 'access_levels', locals: { f: f } %fieldset %legend Profile |