Skip to content
Snippets Groups Projects
Commit 61723900 authored by Andrew8xx8's avatar Andrew8xx8
Browse files

User Teams specific code moved to user_teams controller

parent b49cfbc1
Branches
Tags v7.13.4
No related merge requests found
class Projects::ApplicationController < ApplicationController class Projects::ApplicationController < ApplicationController
   
before_filter :authorize_admin_team_member!
protected
def user_team
@team ||= UserTeam.find_by_path(params[:id])
end
end end
class Projects::TeamsController < Projects::ApplicationController class Projects::TeamsController < Projects::ApplicationController
   
before_filter :authorize_admin_team_member!
def available def available
@teams = current_user.is_admin? ? UserTeam.scoped : current_user.user_teams @teams = current_user.is_admin? ? UserTeam.scoped : current_user.user_teams
@teams = @teams.without_project(project) @teams = @teams.without_project(project)
Loading
@@ -24,4 +26,9 @@ class Projects::TeamsController < Projects::ApplicationController
Loading
@@ -24,4 +26,9 @@ class Projects::TeamsController < Projects::ApplicationController
redirect_to project_team_index_path(project) redirect_to project_team_index_path(project)
end end
   
protected
def user_team
@team ||= UserTeam.find_by_path(params[:id])
end
end end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment