Add db/user seeds
This commit is contained in:
@@ -37,6 +37,7 @@ class CreateAccount < ApplicationService
|
||||
end
|
||||
|
||||
# TODO move to confirmation
|
||||
# (and/or add email_confirmed to entry and use in login filter)
|
||||
def add_ldap_document
|
||||
hashed_pw = Devise.ldap_auth_password_builder.call(@password)
|
||||
CreateLdapUserJob.perform_later(@username, @domain, @email, hashed_pw)
|
||||
@@ -49,6 +50,8 @@ class CreateAccount < ApplicationService
|
||||
end
|
||||
|
||||
def create_lndhub_wallet(user)
|
||||
#TODO enable in development when we have a local lndhub (mock?) API
|
||||
return if Rails.env.development?
|
||||
CreateLndhubWalletJob.perform_later(user)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -10,6 +10,10 @@ class LdapService < ApplicationService
|
||||
res
|
||||
end
|
||||
|
||||
def add_attribute(dn, attr, value)
|
||||
ldap_client.add_attribute dn, attr, value
|
||||
end
|
||||
|
||||
def delete_entry(dn, interactive=false)
|
||||
puts "Deleting entry: #{dn}" if interactive
|
||||
res = ldap_client.delete dn: dn
|
||||
|
||||
Reference in New Issue
Block a user