[refs #150] Fix collaborators cancan authorize

This commit is contained in:
konstantin.grabar 2012-02-06 19:04:56 +04:00
parent edd2ae2d86
commit a83d64eaab
1 changed files with 8 additions and 3 deletions

View File

@ -6,7 +6,8 @@ class CollaboratorsController < ApplicationController
before_filter :find_users
before_filter :find_groups
load_and_authorize_resource :project
load_resource :project
before_filter :authorize_collaborators
def index
redirect_to edit_project_collaborators_path(@project)
@ -130,4 +131,8 @@ class CollaboratorsController < ApplicationController
def find_groups
@groups = @project.groups#Group.all
end
def authorize_collaborators
authorize! :update, @project
end
end