Sha256: 9a8bc510530197da9f3b3335270e93cdd25acc2277bc17ab3202af85304c578b
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