diff --git a/app/controllers/teams/projects_controller.rb b/app/controllers/teams/projects_controller.rb index 21ddba865f3..9e9cd9f5f57 100644 --- a/app/controllers/teams/projects_controller.rb +++ b/app/controllers/teams/projects_controller.rb @@ -9,9 +9,8 @@ class Teams::ProjectsController < Teams::ApplicationController def new user_team - @avaliable_projects = Project.scoped + @avaliable_projects = current_user.owned_projects.scoped @avaliable_projects = @avaliable_projects.without_team(user_team) if user_team.projects.any? - #@projects.reject!(&:empty_repo?) redirect_to team_projects_path(user_team), notice: "No avalible projects." unless @avaliable_projects.any? end