jbox-web/redmine_git_hosting

View on GitHub
lib/redmine_git_hosting/auth.rb

Summary

Maintainability
A
0 mins
Test Coverage
# frozen_string_literal: true

module RedmineGitHosting
  class Auth
    def find(login, password)
      user = User.find_by login: login
      # Return if user not found
      return if user.nil?

      # Return user if password matches
      user if user.check_password? password
    end
  end
end