Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
90699d93
Commit
90699d93
authored
Feb 01, 2021
by
Marius Bobin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "Merge branch '239031-yo-remove-avatar-blocked-user' into 'master'"
This reverts merge request !52051
parent
0a45fdb9
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
18 deletions
+5
-18
app/helpers/avatars_helper.rb
app/helpers/avatars_helper.rb
+5
-4
changelogs/unreleased/239031-yo-remove-avatar-blocked-user.yml
...elogs/unreleased/239031-yo-remove-avatar-blocked-user.yml
+0
-5
spec/helpers/avatars_helper_spec.rb
spec/helpers/avatars_helper_spec.rb
+0
-9
No files found.
app/helpers/avatars_helper.rb
View file @
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
)
...
...
changelogs/unreleased/239031-yo-remove-avatar-blocked-user.yml
deleted
100644 → 0
View file @
0a45fdb9
---
title
:
Remove avatar of the blocked user
merge_request
:
52051
author
:
Yogi (@yo)
type
:
fixed
spec/helpers/avatars_helper_spec.rb
View file @
90699d93
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment