Improve external users feature

This commit is contained in:
Zeger-Jan van de Weg 2016-03-14 22:06:23 +01:00
parent 88f8d3a4d6
commit ab418e27a9
4 changed files with 8 additions and 6 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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?