Commit 4ba42756 authored by Bob Van Landuyt's avatar Bob Van Landuyt

Bump version to 7.1.3

parent aa10b70f
v7.1.3
- Use username instead of full name for identifying users (!204)
v7.1.2
- Add missing GitlabLogger#error method (!200)
......
......@@ -196,8 +196,14 @@ class GitlabShell # rubocop:disable Metrics/ClassLength
end
end
def username_from_discover
return nil unless user && user['username']
"@#{user['username']}"
end
def username
@username ||= user && user['username'] || 'Anonymous'
@username ||= username_from_discover || 'Anonymous'
end
# User identifier to be used in log messages.
......
......@@ -31,7 +31,7 @@ describe GitlabShell do
let(:api) do
double(GitlabNet).tap do |api|
api.stub(discover: { 'name' => 'John Doe' })
api.stub(discover: { 'name' => 'John Doe', 'username' => 'testuser' })
api.stub(check_access: GitAccessStatus.new(
true,
'ok',
......
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