Sha256: 39e98a8faf7bd4440f510491fb56f14ca62728b1426b0adf06cf86300009c760

Contents?: true

Size: 306 Bytes

Versions: 2

Compression:

Stored size: 306 Bytes

Contents

require 'cancan'

module FcrepoAdmin
  module DatastreamAbility

    def custom_permissions
      can :read, ActiveFedora::Datastream do |ds|
        test_read(ds.pid)
      end 

      can [:edit, :update, :destroy], ActiveFedora::Datastream do |ds|
        test_edit(ds.pid)
      end
    end

  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
fcrepo_admin-0.2.3 lib/fcrepo_admin/datastream_ability.rb
fcrepo_admin-0.2.0 lib/fcrepo_admin/datastream_ability.rb