Use keyword arguments for ApplicationService calls

Not all services are using keywords, which breaks those calls in Ruby 3
This commit is contained in:
2024-02-02 15:50:25 +02:00
parent 420442c1c0
commit 179a82d2dd
21 changed files with 44 additions and 45 deletions

View File

@@ -1,12 +1,11 @@
module LdapManager
class FetchAvatar < LdapManagerService
def initialize(cn:, ou: nil)
def initialize(cn:)
@cn = cn
@ou = ou
end
def call
treebase = @ou ? "ou=#{@ou},cn=users,#{suffix}" : ldap_config["base"]
treebase = ldap_config["base"]
attributes = %w{ jpegPhoto }
filter = Net::LDAP::Filter.eq("cn", @cn)