Module: Thredded::UserExtender

Instance Method Summary collapse

Methods included from Thredded::UserPermissions::Admin::IfAdminColumnTrue

#thredded_admin?

Methods included from Thredded::UserPermissions::Moderate::IfModeratorColumnTrue

#thredded_can_moderate_messageboard?, #thredded_can_moderate_messageboards

Methods included from Thredded::UserPermissions::Message::ReadersOfWriteableBoards

#thredded_can_message_users

Methods included from Thredded::UserPermissions::Write::All

#thredded_can_write_messageboards

Methods included from Thredded::UserPermissions::Read::All

#thredded_can_read_messageboard?, #thredded_can_read_messageboards

Instance Method Details

#thredded_anonymous?Boolean

Returns:

  • (Boolean)


60
61
62
# File 'app/models/thredded/user_extender.rb', line 60

def thredded_anonymous?
  false
end

#thredded_display_nameObject



64
65
66
67
68
# File 'app/models/thredded/user_extender.rb', line 64

def thredded_display_name
  send(Thredded.user_display_name_method).presence || fail(<<-ERROR)
    User.#{Thredded.user_display_name_method} must not be empty: please set make sure non nil or configure Thredded.user_display_name_method")
  ERROR
end

#thredded_user_detailObject



56
57
58
# File 'app/models/thredded/user_extender.rb', line 56

def thredded_user_detail
  super || build_thredded_user_detail
end

#thredded_user_preferenceObject



52
53
54
# File 'app/models/thredded/user_extender.rb', line 52

def thredded_user_preference
  super || build_thredded_user_preference
end