Sha256: ace4fb41ae215f6253e41c9bde95509ee33a571fd75d16dc83ea77dce8c5b466

Contents?: true

Size: 667 Bytes

Versions: 10

Compression:

Stored size: 667 Bytes

Contents

module Sufia
  module Models
    module WithAccessRight
      extend ActiveSupport::Concern

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

      def open_access?
        access_rights.open_access?
      end

      def open_access_with_embargo_release_date?
        access_rights.open_access_with_embargo_release_date?
      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
end

Version data entries

10 entries across 10 versions & 2 rubygems

Version Path
sufia-3.3.1 sufia-models/app/models/concerns/sufia/models/with_access_right.rb
sufia-models-3.3.1 app/models/concerns/sufia/models/with_access_right.rb
sufia-3.4.0.rc1 sufia-models/app/models/concerns/sufia/models/with_access_right.rb
sufia-models-3.4.0.rc1 app/models/concerns/sufia/models/with_access_right.rb
sufia-3.3.0 sufia-models/app/models/concerns/sufia/models/with_access_right.rb
sufia-models-3.3.0 app/models/concerns/sufia/models/with_access_right.rb
sufia-3.2.1 sufia-models/app/models/concerns/sufia/models/with_access_right.rb
sufia-models-3.2.1 app/models/concerns/sufia/models/with_access_right.rb
sufia-3.1.3 sufia-models/app/models/concerns/sufia/models/with_access_right.rb
sufia-models-3.1.3 app/models/concerns/sufia/models/with_access_right.rb