diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2012-12-04 17:22:22 +0400 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2012-12-04 17:22:22 +0400 |
commit | d8398921eb34fe7cee59df99ac4fffceca0c19fc (patch) | |
tree | 2fb9e9f3540241ff5d1380b92e657582c5cd897d | |
parent | ba74fa1413d3274f7a3282d7f59046beecb32912 (diff) |
Dont allow select block user as new team member
-rw-r--r-- | app/controllers/admin/projects_controller.rb | 2 | ||||
-rw-r--r-- | app/views/team_members/_form.html.haml | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/admin/projects_controller.rb b/app/controllers/admin/projects_controller.rb index f8c2f2b2bf1..4fea8709b70 100644 --- a/app/controllers/admin/projects_controller.rb +++ b/app/controllers/admin/projects_controller.rb @@ -10,7 +10,7 @@ class Admin::ProjectsController < AdminController end def show - @users = User.scoped + @users = User.active @users = @users.not_in_project(@project) if @project.users.present? @users = @users.all end diff --git a/app/views/team_members/_form.html.haml b/app/views/team_members/_form.html.haml index 92167138081..e5d9a4a4b5e 100644 --- a/app/views/team_members/_form.html.haml +++ b/app/views/team_members/_form.html.haml @@ -11,7 +11,7 @@ %h6 1. Choose people you want in the team .clearfix = f.label :user_ids, "People" - .input= select_tag(:user_ids, options_from_collection_for_select(User.not_in_project(@project).all, :id, :name), {data: {placeholder: "Select users"}, class: "chosen xxlarge", multiple: true}) + .input= select_tag(:user_ids, options_from_collection_for_select(User.active.not_in_project(@project).all, :id, :name), {data: {placeholder: "Select users"}, class: "chosen xxlarge", multiple: true}) %h6 2. Set access level for them .clearfix |