update all teams code. refactoring and some corrections

This commit is contained in:
Andrey Kumanyaev 2013-01-23 02:20:27 +04:00 committed by Dmitriy Zaporozhets
parent 7658f8c151
commit 18bd1c9d30
35 changed files with 332 additions and 283 deletions

View file

@ -5,11 +5,7 @@ class Teams::ApplicationController < ApplicationController
protected
def user_team
@user_team ||= UserTeam.find_by_path(params[:team_id])
end
def authorize_manage_user_team!
return access_denied! unless can?(current_user, :manage_user_team, user_team)
@team ||= UserTeam.find_by_path(params[:team_id])
end
end