Class: WebHookUserSerializer

Inherits:
UserSerializer show all
Defined in:
app/serializers/web_hook_user_serializer.rb

Instance Attribute Summary

Attributes inherited from UserCardSerializer

#topic_post_count

Instance Method Summary collapse

Methods inherited from UserSerializer

#allowed_pm_usernames, #bio_cooked, #bio_raw, #can_be_deleted, #can_change_bio, #can_change_location, #can_change_tracking_preferences, #can_change_website, #can_delete_all_posts, #can_edit, #can_edit_email, #can_edit_name, #can_edit_username, #can_upload_profile_header, #can_upload_user_card_background, #custom_avatar_template, #custom_avatar_upload_id, #gravatar_avatar_template, #gravatar_avatar_upload_id, #group_users, #groups, #has_title_badges, #ignored_usernames, #include_associated_accounts?, #include_custom_avatar_template?, #include_custom_avatar_upload_id?, #include_gravatar_avatar_template?, #include_gravatar_avatar_upload_id?, #include_group_users?, #include_second_factor_backup_enabled?, #include_second_factor_enabled?, #include_second_factor_remaining_backup_codes?, #include_user_option?, #mailing_list_posts_per_day, #muted_category_ids, #muted_usernames, #pending_count, #post_count, #profile_background_upload_url, #profile_view_count, #regular_category_ids, #second_factor_backup_enabled, #second_factor_enabled, #second_factor_remaining_backup_codes, #system_avatar_template, #system_avatar_upload_id, #tracked_category_ids, #use_logo_small_as_avatar, #user_api_keys, #user_auth_tokens, #user_notification_schedule, #watched_category_ids, #watched_first_post_category_ids

Methods included from UserSidebarMixin

#display_sidebar_tags, #include_display_sidebar_tags?, #include_sidebar_category_ids?, #include_sidebar_sections?, #include_sidebar_tags?, #sidebar_category_ids, #sidebar_sections, #sidebar_tags

Methods included from NavigationMenuTagsMixin

#serialize_tags

Methods included from UserTagNotificationsMixin

#muted_tags, #regular_tags, #tag_user_notification_levels, #tags_with_notification_level, #tracked_tags, #watched_tags, #watching_first_post_tags

Methods inherited from UserCardSerializer

#bio_excerpt, #can_ignore_user, #can_mute_user, #can_send_private_message_to_user, #can_send_private_messages, #card_background_upload_url, #custom_fields, #featured_topic, #flair_bg_color, #flair_color, #flair_name, #flair_url, #ignored, #include_pending_posts_count?, #include_status?, #include_suspend_reason?, #include_suspended_till?, #include_timezone?, #include_topic_post_count?, #include_user_fields?, #location, #muted, #primary_group_name, private_attributes, #recent_time_read, staff_attributes, #status, #time_read, #timezone, untrusted_attributes, #user_fields, #website, #website_name

Methods inherited from BasicUserSerializer

#avatar_template, #categories_with_notification_level, #category_user_notification_levels, #include_name?, #name, #user, #user_is_current_user

Methods inherited from ApplicationSerializer

expire_cache_fragment!, fragment_cache

Methods inherited from ActiveModel::Serializer

#include!

Instance Method Details

#external_idObject



53
54
55
# File 'app/serializers/web_hook_user_serializer.rb', line 53

def external_id
  object.single_sign_on_record.external_id
end

#include_email?Boolean Also known as: include_secondary_emails?

Returns:

  • (Boolean)


43
44
45
# File 'app/serializers/web_hook_user_serializer.rb', line 43

def include_email?
  scope.is_admin?
end

#include_external_id?Boolean

Returns:

  • (Boolean)


49
50
51
# File 'app/serializers/web_hook_user_serializer.rb', line 49

def include_external_id?
  scope.is_admin? && object.single_sign_on_record
end

#staff_attributes(*attrs) ⇒ Object

remove staff attributes



7
8
# File 'app/serializers/web_hook_user_serializer.rb', line 7

def staff_attributes(*attrs)
end