From 617239000762a01c57b35cbb699f155622ae921a Mon Sep 17 00:00:00 2001
From: Andrew8xx8 <avk@8xx8.ru>
Date: Sun, 24 Mar 2013 11:57:15 +0400
Subject: [PATCH] User Teams specific code moved to user_teams controller

---
 app/controllers/projects/application_controller.rb | 8 --------
 app/controllers/projects/teams_controller.rb       | 7 +++++++
 2 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/app/controllers/projects/application_controller.rb b/app/controllers/projects/application_controller.rb
index 7e4776d2d75..49e514a228e 100644
--- a/app/controllers/projects/application_controller.rb
+++ b/app/controllers/projects/application_controller.rb
@@ -1,11 +1,3 @@
 class Projects::ApplicationController < ApplicationController
 
-  before_filter :authorize_admin_team_member!
-
-  protected
-
-  def user_team
-    @team ||= UserTeam.find_by_path(params[:id])
-  end
-
 end
diff --git a/app/controllers/projects/teams_controller.rb b/app/controllers/projects/teams_controller.rb
index 17e7367364a..c7d51b84fc4 100644
--- a/app/controllers/projects/teams_controller.rb
+++ b/app/controllers/projects/teams_controller.rb
@@ -1,5 +1,7 @@
 class Projects::TeamsController < Projects::ApplicationController
 
+  before_filter :authorize_admin_team_member!
+
   def available
     @teams = current_user.is_admin? ? UserTeam.scoped : current_user.user_teams
     @teams = @teams.without_project(project)
@@ -24,4 +26,9 @@ class Projects::TeamsController < Projects::ApplicationController
     redirect_to project_team_index_path(project)
   end
 
+  protected
+
+  def user_team
+    @team ||= UserTeam.find_by_path(params[:id])
+  end
 end
-- 
GitLab