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
No related branches found
No related tags found
1 merge request!3351Personal snipepts support added
class Projects::ApplicationController < ApplicationController
 
before_filter :authorize_admin_team_member!
protected
def user_team
@team ||= UserTeam.find_by_path(params[:id])
end
end
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)
Loading
Loading
@@ -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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment