From e52fec9cd9812e6fd8a7700c2188dbbf6e022c81 Mon Sep 17 00:00:00 2001 From: Andrey Kumanyaev Date: Thu, 24 Jan 2013 22:19:18 +0400 Subject: [PATCH] Update check If user can assign project to team --- app/controllers/teams/projects_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/teams/projects_controller.rb b/app/controllers/teams/projects_controller.rb index f5729351..27dc9344 100644 --- a/app/controllers/teams/projects_controller.rb +++ b/app/controllers/teams/projects_controller.rb @@ -4,7 +4,7 @@ class Teams::ProjectsController < Teams::ApplicationController def index @projects = user_team.projects - @avaliable_projects = current_user.admin? ? Project.without_team(user_team) : (Project.personal(current_user) + current_user.projects).uniq + @avaliable_projects = current_user.admin? ? Project.without_team(user_team) : current_user.owned_projects.without_team(user_team) end def new