Do not use attr_maps defaults when some are provided in the config

This commit is contained in:
Daniel Berteaud 2019-07-17 09:05:10 +02:00
parent 1fa3ccb2d7
commit 556172241b
1 changed files with 5 additions and 0 deletions

View File

@ -968,5 +968,10 @@ sub get_default_conf {
}
};
}
# If some attribute mapping is defined in the provided conf
# do not use defaults
foreach my $type ( qw( users groups ) ) {
$defaults->{$type}->{attr_map} = {} if ( defined $conf->{$type}->{attr_map} );
}
return merge $defaults, $conf;
}