Class: Thredded::NullUser
Instance Method Summary
collapse
#thredded_admin?
#thredded_can_moderate_messageboards
#thredded_can_message_users
#thredded_can_write_messageboards
#thredded_can_read_messageboards
Instance Method Details
#id ⇒ Object
19
20
21
|
# File 'app/models/thredded/null_user.rb', line 19
def id
0
end
|
#member_of?(_) ⇒ Boolean
23
24
25
|
# File 'app/models/thredded/null_user.rb', line 23
def member_of?(_)
false
end
|
#name ⇒ Object
27
28
29
|
# File 'app/models/thredded/null_user.rb', line 27
def name
'Anonymous User'
end
|
#thredded_anonymous? ⇒ Boolean
39
40
41
|
# File 'app/models/thredded/null_user.rb', line 39
def thredded_anonymous?
true
end
|
#thredded_private_topics ⇒ Object
15
16
17
|
# File 'app/models/thredded/null_user.rb', line 15
def thredded_private_topics
Thredded::PrivateTopic.none
end
|
#thredded_user_detail ⇒ Object
43
44
45
|
# File 'app/models/thredded/null_user.rb', line 43
def thredded_user_detail
Thredded::UserDetail.new
end
|
#thredded_user_preference ⇒ Object
47
48
49
|
# File 'app/models/thredded/null_user.rb', line 47
def thredded_user_preference
Thredded::UserPreference.new
end
|
#to_s ⇒ Object
31
32
33
|
# File 'app/models/thredded/null_user.rb', line 31
def to_s
name
end
|
#valid? ⇒ Boolean
35
36
37
|
# File 'app/models/thredded/null_user.rb', line 35
def valid?
false
end
|