developer.rb 442 B

1234567891011121314
  1. # Copyright (C) 2012-2016 Zammad Foundation, http://zammad-foundation.org/
  2. module Auth::Developer
  3. def self.check(username, password, _config, user)
  4. # development systems
  5. return false if !username
  6. return false if !user
  7. return false if Setting.get('developer_mode') != true
  8. return false if password != 'test'
  9. Rails.logger.info "System in developer mode, authentication for user #{user.login} ok."
  10. user
  11. end
  12. end