17 lines
305 B
Ruby
17 lines
305 B
Ruby
module LdapManager
|
|
class UpdatePgpKey < LdapManagerService
|
|
def initialize(dn:, pubkey:)
|
|
@dn = dn
|
|
@pubkey = pubkey
|
|
end
|
|
|
|
def call
|
|
if @pubkey.present?
|
|
replace_attribute @dn, :pgpKey, @pubkey
|
|
else
|
|
delete_attribute @dn, :pgpKey
|
|
end
|
|
end
|
|
end
|
|
end
|