Sha256: 6a4018f67e1f0995a9910cc7c98c86434d03793d81489110f7795e7cbb82734d

Contents?: true

Size: 525 Bytes

Versions: 46

Compression:

Stored size: 525 Bytes

Contents

require 'singleton'

class AnonymousUser
  include Singleton

  def is_admin?
    false
  end

  def is_anonymous?
    true
  end

  def is_human?
    true
  end

  def is_application?
    false
  end

  def id
    nil
  end

  def authentications 
    []
  end

  def identity
    nil
  end

  # Necessary if an anonymous user ever runs into an Exception
  # or else the developer email doesn't work
  def username
    'anonymous'
  end

  def full_name
    "Anonymous User"
  end

  def casual_name
    full_name
  end

end

Version data entries

46 entries across 46 versions & 1 rubygems

Version Path
openstax_accounts-8.0.0 spec/dummy/app/models/anonymous_user.rb
openstax_accounts-7.13.1 spec/dummy/app/models/anonymous_user.rb
openstax_accounts-7.13.0 spec/dummy/app/models/anonymous_user.rb
openstax_accounts-7.12.0 spec/dummy/app/models/anonymous_user.rb
openstax_accounts-7.11.0 spec/dummy/app/models/anonymous_user.rb
openstax_accounts-7.10.0 spec/dummy/app/models/anonymous_user.rb
openstax_accounts-7.9.0 spec/dummy/app/models/anonymous_user.rb
openstax_accounts-7.8.0 spec/dummy/app/models/anonymous_user.rb
openstax_accounts-7.7.0 spec/dummy/app/models/anonymous_user.rb
openstax_accounts-7.6.0 spec/dummy/app/models/anonymous_user.rb
openstax_accounts-7.5.0 spec/dummy/app/models/anonymous_user.rb
openstax_accounts-7.4.0 spec/dummy/app/models/anonymous_user.rb
openstax_accounts-7.3.0 spec/dummy/app/models/anonymous_user.rb
openstax_accounts-7.2.0 spec/dummy/app/models/anonymous_user.rb
openstax_accounts-7.1.0 spec/dummy/app/models/anonymous_user.rb
openstax_accounts-7.0.1 spec/dummy/app/models/anonymous_user.rb
openstax_accounts-7.0.0 spec/dummy/app/models/anonymous_user.rb
openstax_accounts-6.4.2 spec/dummy/app/models/anonymous_user.rb
openstax_accounts-6.4.1 spec/dummy/app/models/anonymous_user.rb
openstax_accounts-6.4.0 spec/dummy/app/models/anonymous_user.rb