Sha256: 8a0a8d948034e931a85911d6ebf15ea5aa64014f549357420adcad132c32ab38

Contents?: true

Size: 553 Bytes

Versions: 4

Compression:

Stored size: 553 Bytes

Contents

module CurationConcern
  module WithAccessRight
    extend ActiveSupport::Concern

    included do
      attr_accessor :visibility
    end

    def under_embargo?
      @under_embargo ||= rightsMetadata.under_embargo?
    end

    def open_access?
      access_rights.open_access?
    end

    def authenticated_only_access?
      access_rights.authenticated_only?
    end

    def private_access?
      access_rights.private?
    end

    def access_rights
      @access_rights ||= AccessRight.new(self)
    end
    protected :access_rights

  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
curate-0.1.3 app/repository_models/curation_concern/with_access_right.rb
curate-0.1.2 app/repository_models/curation_concern/with_access_right.rb
curate-0.1.1 app/repository_models/curation_concern/with_access_right.rb
curate-0.1.0 app/repository_models/curation_concern/with_access_right.rb