app/models/ability.rb
# Define any customized permissions here.
Define any customized permissions here.
Define any customized permissions here .
def custom_permissions
    can :download_original, FileSet do |fs|
      !fs.parent.is_a?(AudioRecording) && can?(:read, fs)
    end
    metadata_admin_permissions
    rights_admin_permissions
    discover_permissions
  end
def custom_permissions can :download_original , FileSet do | fs | ! fs . parent . is_a? ( AudioRecording ) && can? ( :read , fs ) end metadata_admin_permissions rights_admin_permissions discover_permissions end
Define any customized permissions here.
Define any customized permissions here .
# Don't allow downloading originals of Audio files. # TODO: Load parent class from Solr, it'll be faster