forked from Gitlink/forgeplus
Merge branch 'dev_trustie' of http://gitea.trustie.net/jasder/forgeplus into dev_trustie
This commit is contained in:
commit
b4615c645e
|
@ -29,4 +29,8 @@ module ProjectsHelper
|
|||
|
||||
member&.roles&.last&.name || permission
|
||||
end
|
||||
|
||||
def find_user_by_login_or_mail(identifier)
|
||||
(User.find_by_login identifier) || (User.find_by_mail identifier)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -13,7 +13,7 @@ json.array! @branches do |branch|
|
|||
json.time_from_now time_from_now(branch['commit']['timestamp'])
|
||||
end
|
||||
|
||||
user = User.find_by_login branch['commit']['author']['username']
|
||||
user = find_user_by_login_or_mail(branch['commit']['author']['username'])
|
||||
json.author do
|
||||
if user
|
||||
json.login user.login
|
||||
|
|
Loading…
Reference in New Issue