[refs #150] Fix collaborators cancan authorize
This commit is contained in:
parent
edd2ae2d86
commit
a83d64eaab
|
@ -6,7 +6,8 @@ class CollaboratorsController < ApplicationController
|
||||||
before_filter :find_users
|
before_filter :find_users
|
||||||
before_filter :find_groups
|
before_filter :find_groups
|
||||||
|
|
||||||
load_and_authorize_resource :project
|
load_resource :project
|
||||||
|
before_filter :authorize_collaborators
|
||||||
|
|
||||||
def index
|
def index
|
||||||
redirect_to edit_project_collaborators_path(@project)
|
redirect_to edit_project_collaborators_path(@project)
|
||||||
|
@ -130,4 +131,8 @@ class CollaboratorsController < ApplicationController
|
||||||
def find_groups
|
def find_groups
|
||||||
@groups = @project.groups#Group.all
|
@groups = @project.groups#Group.all
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def authorize_collaborators
|
||||||
|
authorize! :update, @project
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue