diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-08-18 13:50:51 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-08-18 13:50:51 +0300 |
commit | db384e6b19af03b4c3c82a5760d83a3fd79f7982 (patch) | |
tree | 34beaef37df5f47ccbcf5729d7583aae093cffa0 /app/helpers/profiles_helper.rb | |
parent | 54fd7b1bad233e3944434da91d257fa7f63c3996 (diff) |
Add latest changes from gitlab-org/gitlab@16-3-stable-eev16.3.0-rc42
Diffstat (limited to 'app/helpers/profiles_helper.rb')
-rw-r--r-- | app/helpers/profiles_helper.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/app/helpers/profiles_helper.rb b/app/helpers/profiles_helper.rb index 26463003f8d..05605394d57 100644 --- a/app/helpers/profiles_helper.rb +++ b/app/helpers/profiles_helper.rb @@ -73,6 +73,21 @@ module ProfilesHelper def prevent_delete_account? false end + + def user_profile_data(user) + { + profile_path: profile_path, + profile_avatar_path: profile_avatar_path, + avatar_url: avatar_icon_for_user(user, current_user: current_user), + has_avatar: user.avatar?.to_s, + gravatar_enabled: gravatar_enabled?.to_s, + gravatar_link: { hostname: Gitlab.config.gravatar.host, url: "https://#{Gitlab.config.gravatar.host}" }.to_json, + brand_profile_image_guidelines: current_appearance&.profile_image_guidelines? ? brand_profile_image_guidelines : '', + cropper_css_path: ActionController::Base.helpers.stylesheet_path('lazy_bundles/cropper.css'), + user_path: user_path(current_user), + **user_status_properties(user) + } + end end ProfilesHelper.prepend_mod |