Merge branch '105046446-users_import' into staging

This commit is contained in:
Stas 2015-11-11 11:54:26 +02:00
commit 6be6ca5a94

View file

@ -155,6 +155,7 @@ namespace :import do
users << ApiUser.new({
username: x.acl.last.try(:password) ? x.acl.last.try(:password) : x.acl.first.try(:password),
password: ('a'..'z').to_a.shuffle.first(8).join,
identity_code: x.acl.last.try(:password) ? x.acl.last.try(:password) : x.acl.first.try(:password),
registrar_id: Registrar.find_by(legacy_id: x.try(:id)).try(:id),
roles: ['billing'],
legacy_id: x.try(:id)