Commit be1d6d73 authored by Igor Drozdov's avatar Igor Drozdov

Merge branch 'revert-056e4ed0' into 'master'

Revert "Merge branch '239031-yo-remove-avatar-blocked-user' into 'master'"

See merge request gitlab-org/gitlab!53061
parents d24ac7d0 90699d93
......@@ -31,10 +31,11 @@ module AvatarsHelper
end
def avatar_icon_for_user(user = nil, size = nil, scale = 2, only_path: true)
return gravatar_icon(nil, size, scale) unless user
return default_avatar if user.blocked?
user.avatar_url(size: size, only_path: only_path) || default_avatar
if user
user.avatar_url(size: size, only_path: only_path) || default_avatar
else
gravatar_icon(nil, size, scale)
end
end
def gravatar_icon(user_email = '', size = nil, scale = 2)
......
---
title: Remove avatar of the blocked user
merge_request: 52051
author: Yogi (@yo)
type: fixed
......@@ -135,15 +135,6 @@ RSpec.describe AvatarsHelper do
helper.avatar_icon_for_user(nil, 20, 2)
end
end
context 'for a blocked user' do
let(:user) { create(:user, :blocked) }
it 'returns the default avatar' do
expect(helper.avatar_icon_for_user(user).to_s)
.to eq(helper.default_avatar)
end
end
end
describe '#gravatar_icon' do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment