Login changed for idkaart, random password added.

This commit is contained in:
Stas 2015-11-05 13:14:43 +02:00
parent e945bcf1f1
commit 52daf0ba14

View file

@ -145,15 +145,15 @@ namespace :import do
if x.acl.last.try(:cert) != 'idkaart'
users << ApiUser.new({
username: x.handle.try(:strip),
password: x.acl.last.try(:password) ? x.acl.last.try(:password) : x.acl.first.try(:password),
password: x.acl.last.try(:password) ? x.acl.last.try(:password) : ('a'..'z').to_a.shuffle.first(8).join,
identity_code: x.handle.try(:strip),
registrar_id: Registrar.find_by(legacy_id: x.try(:id)).try(:id),
legacy_id: x.try(:id)
})
else
elsif x.acl.last.try(:cert) == 'idkaart'
users << ApiUser.new({
username: x.handle.try(:strip),
password: x.acl.last.try(:password) ? x.acl.last.try(:password) : x.acl.first.try(:password),
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,
registrar_id: Registrar.find_by(legacy_id: x.try(:id)).try(:id),
legacy_id: x.try(:id)
})