Sha256: 21f240193fe11cd0adeaf70fa8ec9902b5b4250e028ec36c1f620bb3b45614b1
Contents?: true
Size: 477 Bytes
Versions: 14
Compression:
Stored size: 477 Bytes
Contents
# frozen_string_literal: true module Hyrax class IIIFAuthorizationService attr_reader :controller def initialize(controller) @controller = controller end # @note we ignore the `action` param here in favor of the `:show` action for all permissions def can?(_action, object) controller.current_ability.can?(:show, file_set_id_for(object)) end private def file_set_id_for(object) object.id.split('/').first end end end
Version data entries
14 entries across 14 versions & 1 rubygems