Commit 2471c79c authored by Clément OUDOT's avatar Clément OUDOT
Browse files

Use Serializer in LDAP config backend

parent 7d255abd
...@@ -8,8 +8,9 @@ package Lemonldap::NG::Common::Conf::LDAP; ...@@ -8,8 +8,9 @@ package Lemonldap::NG::Common::Conf::LDAP;
use strict; use strict;
use Net::LDAP; use Net::LDAP;
use Lemonldap::NG::Common::Conf::Constants; #inherits use Lemonldap::NG::Common::Conf::Constants; #inherits
use Lemonldap::NG::Common::Conf::Serializer;
our $VERSION = 0.01; our $VERSION = 0.02;
BEGIN { BEGIN {
*Lemonldap::NG::Common::Conf::ldap = \&ldap; *Lemonldap::NG::Common::Conf::ldap = \&ldap;
...@@ -122,6 +123,7 @@ sub unlock { ...@@ -122,6 +123,7 @@ sub unlock {
sub store { sub store {
my ( $self, $fields ) = @_; my ( $self, $fields ) = @_;
$fields = $self->serialize($fields);
my $confName = "lmConf-" . $fields->{cfgNum}; my $confName = "lmConf-" . $fields->{cfgNum};
my $confDN = "cn=$confName," . $self->{ldapConfBase}; my $confDN = "cn=$confName," . $self->{ldapConfBase};
...@@ -172,7 +174,7 @@ sub load { ...@@ -172,7 +174,7 @@ sub load {
} }
} }
$self->ldap->unbind() && delete $self->{ldap}; $self->ldap->unbind() && delete $self->{ldap};
return $f; return $self->unserialize($f);
} }
sub delete { sub delete {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment