OSDN Git Service

Show only teams we have access to
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Thu, 24 Jan 2013 08:39:16 +0000 (10:39 +0200)
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Thu, 24 Jan 2013 20:31:49 +0000 (22:31 +0200)
app/controllers/teams_controller.rb

index ea060b3..7de0942 100644 (file)
@@ -10,7 +10,7 @@ class TeamsController < ApplicationController
   layout 'user_team',       only: [:show, :edit, :update, :destroy, :issues, :merge_requests, :search]
 
   def index
-    @teams = UserTeam.order('name ASC')
+    @teams = current_user.user_teams.order('name ASC')
   end
 
   def show