Sha256: 056ef3f3cacfeaaac3c34180a4f0e16c37cb5d36e7b51868d59a575ab09452d7

Contents?: true

Size: 794 Bytes

Versions: 6

Compression:

Stored size: 794 Bytes

Contents

# frozen_string_literal: true
module Thredded
  module UserPermissions
    module Read
      module All
        extend ActiveSupport::Concern
        included { extend ClassMethods }

        # @return [ActiveRecord::Relation<Thredded::Messageboard>] messageboards that the user can read
        def thredded_can_read_messageboards
          Thredded::Messageboard.all
        end

        module ClassMethods
          # Users that can read some of the given messageboards.
          #
          # @param _messageboards [Array<Thredded::Messageboard>]
          # @return [ActiveRecord::Relation<Thredded.user_class>] users that can read the given messageboards
          def thredded_messageboards_readers(_messageboards)
            all
          end
        end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
thredded-0.12.1 app/models/thredded/user_permissions/read/all.rb
thredded-0.12.0 app/models/thredded/user_permissions/read/all.rb
thredded-0.11.1 app/models/thredded/user_permissions/read/all.rb
thredded-0.11.0 app/models/thredded/user_permissions/read/all.rb
thredded-0.10.1 app/models/thredded/user_permissions/read/all.rb
thredded-0.10.0 app/models/thredded/user_permissions/read/all.rb