Fixed: post-receive, project remove, tests
This commit is contained in:
parent
39e37677f2
commit
70e3bffd95
9 changed files with 43 additions and 47 deletions
|
@ -27,8 +27,9 @@ class PostReceive
|
|||
User.find_by_email(email) if email
|
||||
elsif /^[A-Z0-9._%a-z\-]+@(?:[A-Z0-9a-z\-]+\.)+[A-Za-z]{2,4}$/.match(identifier)
|
||||
User.find_by_email(identifier)
|
||||
else
|
||||
User.find_by_username(identifier.strip)
|
||||
elsif identifier =~ /key/
|
||||
key_id = identifier.gsub("key-", "")
|
||||
Key.find_by_id(key_id).try(:user)
|
||||
end
|
||||
|
||||
unless user
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue