From 62c9a7224b024a011b52aeb79cae196458fe3279 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Tue, 18 Dec 2018 10:57:56 +0100 Subject: Make allowed maintainers configurable Signed-off-by: Florian Pritz --- lib/App/ArchLinux/PackagerTools.pm | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'lib/App/ArchLinux/PackagerTools.pm') diff --git a/lib/App/ArchLinux/PackagerTools.pm b/lib/App/ArchLinux/PackagerTools.pm index fa246e6..83b357a 100644 --- a/lib/App/ArchLinux/PackagerTools.pm +++ b/lib/App/ArchLinux/PackagerTools.pm @@ -51,7 +51,6 @@ method new_no_defaults($class: $context, $deps = {}) { my $self = {}; bless $self, $class; $self->{deps} = $deps; - $self->{config} = $deps->{config}->get_config(); return $self; } @@ -154,8 +153,8 @@ Filter a list of packages to the maintainers whitelisted in the config file. =cut method filter_by_maintainer($packages) { - # TODO make configurable - return [grep { any {$_->{name} eq 'bluewind'} $_->{maintainers}->@*} $packages->@*]; + my $allowed_maintainers = {map {$_ => 1} $self->{deps}->{config}->get_config()->{allowed_maintainers}->@*}; + return [grep { any {$allowed_maintainers->{$_->{name}}} $_->{maintainers}->@*} $packages->@*]; } =head1 LICENSE -- cgit v1.2.3-24-g4f1b