Sha256: e99b38b7f2420574cc4724ad2c8d477180a4fbe2ffa057ec0b510400bfa28ee1

Contents?: true

Size: 423 Bytes

Versions: 9

Compression:

Stored size: 423 Bytes

Contents

module Thredded
  class NullUser
    def admins?(messageboard)
      false
    end

    def thredded_private_topics
      false
    end

    def can_read_messageboard?(messageboard)
      messageboard.public?
    end

    def id
      0
    end

    def member_of?(messageboard)
      false
    end

    def name
      'Anonymous User'
    end

    def to_s
      name
    end

    def valid?
      false
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
thredded-0.0.12 app/models/thredded/null_user.rb
thredded-0.0.10 app/models/thredded/null_user.rb
thredded-0.0.9 app/models/thredded/null_user.rb
thredded-0.0.8 app/models/thredded/null_user.rb
thredded-0.0.7 app/models/thredded/null_user.rb
thredded-0.0.6 app/models/thredded/null_user.rb
thredded-0.0.5 app/models/thredded/null_user.rb
thredded-0.0.4 app/models/thredded/null_user.rb
thredded-0.0.3 app/models/thredded/null_user.rb