Class: API::Entities::User

Inherits:
UserBasic show all
Includes:
Gitlab::Utils::StrongMemoize, TimeZoneHelper, UsersHelper
Defined in:
lib/api/entities/user.rb

Direct Known Subclasses

UserPublic

Instance Method Summary collapse

Methods included from TimeZoneHelper

#local_time, #local_timezone_instance, #timezone_data

Methods included from UsersHelper

#admin_user_actions_data_attributes, #admin_users_data_attributes, #can_force_email_confirmation?, #can_impersonate_user, #confirm_user_data, #current_user_menu?, #current_user_menu_items, #display_public_email?, #impersonation_enabled?, #impersonation_error_text, #load_max_project_member_accesses, #max_project_member_access, #max_project_member_access_cache_key, #moderation_status, #profile_tab?, #profile_tabs, #user_badges_in_admin_section, #user_clear_status_at, #user_display_name, #user_email_help_text, #user_internal_regex_data, #user_link, #user_profile_actions_data, #user_profile_tabs_app_data, #user_status, #work_information

Methods included from RequestAwareEntity

#request

Instance Method Details

#following_users_allowed(current_user, user) ⇒ Object



29
30
31
32
33
34
35
36
37
# File 'lib/api/entities/user.rb', line 29

def following_users_allowed(current_user, user)
  strong_memoize(:following_users_allowed) do
    if current_user
      current_user.following_users_allowed?(user)
    else
      true
    end
  end
end