Class: AnonymousUser
- Inherits:
-
User
- Object
- ActiveRecord::Base
- Principal
- User
- AnonymousUser
- Defined in:
- app/models/user.rb
Constant Summary
Constants inherited from User
STATUS_ACTIVE, STATUS_ANONYMOUS, STATUS_LOCKED, STATUS_REGISTERED, USER_FORMATS
Instance Method Summary
- - (Object) admin
- - (Object) available_custom_fields
-
- (Boolean) logged?
Overrides a few properties.
- - (Object) mail
- - (Object) name(*args)
- - (Object) rss_key
- - (Object) time_zone
- - (Object) validate_on_create
Methods inherited from User
#active?, #allowed_to?, anonymous, #anonymous?, #api_key, #before_create, #before_save, #check_password?, current, current=, find_by_api_key, find_by_mail, find_by_rss_key, #identity_url=, #locked?, #member_of?, #notified_project_ids=, #notified_projects_ids, #pref, #random_password, #registered?, #reload, #roles_for_project, #to_s, #today, try_to_autologin, try_to_login, #wants_comments_in_reverse_order?
Methods inherited from Principal
Methods inherited from ActiveRecord::Base
Instance Method Details
- (Object) admin
355 |
# File 'app/models/user.rb', line 355 def admin; false end |
- (Object) available_custom_fields
349 350 351 |
# File 'app/models/user.rb', line 349 def available_custom_fields [] end |
- (Boolean) logged?
Overrides a few properties
354 |
# File 'app/models/user.rb', line 354 def logged?; false end |
- (Object) mail
357 |
# File 'app/models/user.rb', line 357 def mail; nil end |
- (Object) name(*args)
356 |
# File 'app/models/user.rb', line 356 def name(*args) I18n.t(:label_user_anonymous) end |
- (Object) rss_key
359 |
# File 'app/models/user.rb', line 359 def rss_key; nil end |
- (Object) time_zone
358 |
# File 'app/models/user.rb', line 358 def time_zone; nil end |
- (Object) validate_on_create
344 345 346 347 |
# File 'app/models/user.rb', line 344 def validate_on_create # There should be only one AnonymousUser in the database errors.add_to_base 'An anonymous user already exists.' if AnonymousUser.find(:first) end |