Sha256: 67978ee66bffaa3ba4b449201604d6a667d9c741b2112cc080bf438150743cb2

Contents?: true

Size: 795 Bytes

Versions: 22

Compression:

Stored size: 795 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

22 entries across 22 versions & 2 rubygems

Version Path
thredded-0.15.4 app/models/thredded/user_permissions/read/all.rb
thredded-0.15.3 app/models/thredded/user_permissions/read/all.rb
thredded-0.15.2 app/models/thredded/user_permissions/read/all.rb
thredded-0.15.1 app/models/thredded/user_permissions/read/all.rb
threddedDANIEL-0.14.5 app/models/thredded/user_permissions/read/all.rb
thredded-0.14.4 app/models/thredded/user_permissions/read/all.rb
thredded-0.14.3 app/models/thredded/user_permissions/read/all.rb
thredded-0.14.2 app/models/thredded/user_permissions/read/all.rb
thredded-0.14.1 app/models/thredded/user_permissions/read/all.rb
thredded-0.14.0 app/models/thredded/user_permissions/read/all.rb
thredded-0.13.8 app/models/thredded/user_permissions/read/all.rb
thredded-0.13.7 app/models/thredded/user_permissions/read/all.rb
thredded-0.13.6 app/models/thredded/user_permissions/read/all.rb
thredded-0.13.5 app/models/thredded/user_permissions/read/all.rb
thredded-0.13.4 app/models/thredded/user_permissions/read/all.rb
thredded-0.13.3 app/models/thredded/user_permissions/read/all.rb
thredded-0.13.2 app/models/thredded/user_permissions/read/all.rb
thredded-0.13.1 app/models/thredded/user_permissions/read/all.rb
thredded-0.13.0 app/models/thredded/user_permissions/read/all.rb
thredded-0.12.4 app/models/thredded/user_permissions/read/all.rb