Allow users to set/update their display name in LDAP
This commit is contained in:
12
app/services/ldap_manager/update_display_name.rb
Normal file
12
app/services/ldap_manager/update_display_name.rb
Normal file
@@ -0,0 +1,12 @@
|
||||
module LdapManager
|
||||
class UpdateDisplayName < LdapManagerService
|
||||
def initialize(dn, display_name)
|
||||
@dn = dn
|
||||
@display_name = display_name
|
||||
end
|
||||
|
||||
def call
|
||||
replace_attribute @dn, :displayName, @display_name
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -6,7 +6,7 @@ module LdapManager
|
||||
end
|
||||
|
||||
def call
|
||||
replace_attribute @dn, :mail, [ @address ]
|
||||
replace_attribute @dn, :mail, @address
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user