SpeciesFileGroup/taxonworks

View on GitHub
app/controllers/tasks/shared/related_data_controller.rb

Summary

Maintainability
A
0 mins
Test Coverage
class Tasks::Shared::RelatedDataController < ApplicationController
  include TaskControllerConfiguration

  before_action :set_object

  def index
  end

  def set_object
    @object = GlobalID::Locator.locate(params[:object_global_id])

    if @object.nil? || (@object.respond_to?(:project_id) && @object.project_id != sessions_current_project_id)
      render status: 404 and return
    end
  end

end