Sha256: 146b34537801bf9f8aee3f3012eff8ca4f327e6ac7b473d46ea43aee57dfee98

Contents?: true

Size: 316 Bytes

Versions: 6

Compression:

Stored size: 316 Bytes

Contents

module Sufia
  module Permissions
    module Readable
      extend ActiveSupport::Concern

      def public?
        read_groups.include?('public')
      end

      def registered?
        read_groups.include?('registered')
      end

      def private?
        !(public? || registered?)
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
sufia-models-6.7.0 lib/sufia/permissions/readable.rb
sufia-models-6.6.1 lib/sufia/permissions/readable.rb
sufia-models-6.6.0 lib/sufia/permissions/readable.rb
sufia-models-6.5.0 lib/sufia/permissions/readable.rb
sufia-models-6.4.0 lib/sufia/permissions/readable.rb
sufia-models-6.3.0 lib/sufia/permissions/readable.rb