developer.rb 409 B

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