Sha256: e256d5f5fa049a3a7fe2c024ced6e2da4af041878f03f64a0476fe7a2d20f262
Contents?: true
Size: 453 Bytes
Versions: 36
Compression:
Stored size: 453 Bytes
Contents
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
36 entries across 36 versions & 1 rubygems