2013-08-17 21:48:01 +00:00
|
|
|
# Copyright (C) 2012-2013 Zammad Foundation, http://zammad-foundation.org/
|
|
|
|
|
|
2014-12-31 09:04:14 +00:00
|
|
|
module Auth::Developer
|
2015-05-25 08:42:58 +00:00
|
|
|
def self.check(username, password, _config, user)
|
2013-01-23 23:55:33 +00:00
|
|
|
|
|
|
|
|
# development systems
|
2015-05-25 08:42:58 +00:00
|
|
|
return false if !username
|
|
|
|
|
return false if !user
|
|
|
|
|
return false if Setting.get('developer_mode') != true
|
|
|
|
|
return false if password != 'test'
|
|
|
|
|
Rails.logger.info "System in developer mode, authentication for user #{user.login} ok."
|
|
|
|
|
user
|
2013-01-23 23:55:33 +00:00
|
|
|
end
|
2013-05-28 12:24:48 +00:00
|
|
|
end
|