summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZeger-Jan van de Weg <zegerjan@gitlab.com>2016-03-14 22:06:23 +0100
committerZeger-Jan van de Weg <zegerjan@gitlab.com>2016-03-14 22:06:23 +0100
commitab418e27a9121704d623343417126b0bdae08e79 (patch)
tree2827db700413571153b43a0e114d62a41596c287
parent88f8d3a4d6521d1001bcea83c2fb7b7c4fe15f37 (diff)
downloadgitlab-ce-ab418e27a9121704d623343417126b0bdae08e79.tar.gz
Improve external users feature
-rw-r--r--app/finders/projects_finder.rb4
-rw-r--r--app/views/admin/users/_form.html.haml2
-rw-r--r--app/views/admin/users/index.html.haml6
-rw-r--r--app/views/dashboard/projects/_zero_authorized_projects.html.haml2
4 files changed, 8 insertions, 6 deletions
diff --git a/app/finders/projects_finder.rb b/app/finders/projects_finder.rb
index 70c073f7d5c..3a5fc5b5907 100644
--- a/app/finders/projects_finder.rb
+++ b/app/finders/projects_finder.rb
@@ -47,9 +47,9 @@ class ProjectsFinder
group.shared_projects.visible_to_user(current_user)
]
if current_user.external?
- user_group_projects.push(group.projects.public_only)
+ user_group_projects << group.projects.public_only
else
- user_group_projects.push(group.projects.public_and_internal_only)
+ user_group_projects << group.projects.public_and_internal_only
end
end
diff --git a/app/views/admin/users/_form.html.haml b/app/views/admin/users/_form.html.haml
index b910040a16a..d2527ede995 100644
--- a/app/views/admin/users/_form.html.haml
+++ b/app/views/admin/users/_form.html.haml
@@ -65,7 +65,7 @@
.form-group
= f.label :external, class: 'control-label'
.col-sm-10= f.check_box :external
- .col-sm-10 External users can not see internal or private projects unless access is explicitly granted. Also, external user can not create projects or groups.
+ .col-sm-10 External users cannot see internal or private projects unless access is explicitly granted. Also, external users cannot create projects or groups.
%fieldset
%legend Profile
diff --git a/app/views/admin/users/index.html.haml b/app/views/admin/users/index.html.haml
index 4394e181008..0ee8dc962b9 100644
--- a/app/views/admin/users/index.html.haml
+++ b/app/views/admin/users/index.html.haml
@@ -74,12 +74,14 @@
%li
.list-item-name
- if user.blocked?
- %i.fa.fa-lock.cred
+ = icon("lock", class: "cred")
- else
- %i.fa.fa-user.cgreen
+ = icon("user", class: "cgreen")
= link_to user.name, [:admin, user]
- if user.admin?
%strong.cred (Admin)
+ - if user.external?
+ %strong.cred (External)
- if user == current_user
%span.cred It's you!
.pull-right
diff --git a/app/views/dashboard/projects/_zero_authorized_projects.html.haml b/app/views/dashboard/projects/_zero_authorized_projects.html.haml
index 65edc05b793..d54c7cad7be 100644
--- a/app/views/dashboard/projects/_zero_authorized_projects.html.haml
+++ b/app/views/dashboard/projects/_zero_authorized_projects.html.haml
@@ -18,7 +18,7 @@
- if current_user.can_create_project?
.link_holder
= link_to new_project_path, class: "btn btn-new" do
- =icon('plus')
+ = icon('plus')
New Project
- if current_user.can_create_group?