diff --git a/app/controllers/projects/collaborators_controller.rb b/app/controllers/projects/collaborators_controller.rb index 485d8faf4..75f84db29 100644 --- a/app/controllers/projects/collaborators_controller.rb +++ b/app/controllers/projects/collaborators_controller.rb @@ -2,7 +2,6 @@ class Projects::CollaboratorsController < Projects::BaseController respond_to :html, :json before_action :authenticate_user! - load_resource :project before_action :authorize_collaborators before_action :find_users diff --git a/app/models/collaborator.rb b/app/models/collaborator.rb index bf14ad59e..3c9ca4a49 100644 --- a/app/models/collaborator.rb +++ b/app/models/collaborator.rb @@ -38,6 +38,7 @@ class Collaborator end def initialize(args = {}) + return false if args.blank? args.to_options! acc_options = args.select{ |(k, v)| k.in? [:actor, :project, :relation] } acc_options.each_pair do |name, value|