diff --git a/lib/App/Netdisco/Worker/Plugin.pm b/lib/App/Netdisco/Worker/Plugin.pm index 19cf651d..70967456 100644 --- a/lib/App/Netdisco/Worker/Plugin.pm +++ b/lib/App/Netdisco/Worker/Plugin.pm @@ -35,8 +35,8 @@ register 'register_worker' => sub { # reduce device_auth by driver, worker's only/no foreach my $stanza (@userconf) { if (ref $job->device) { - next if $no and check_acl_no($job->device->ip, $no); - next if $only and not check_acl_only($job->device->ip, $only); + next if $no and check_acl_no($job->device, $no); + next if $only and not check_acl_only($job->device, $only); } next if exists $stanza->{driver} and exists $workerconf->{driver} and (($stanza->{driver} || '') ne ($workerconf->{driver} || '')); diff --git a/lib/App/Netdisco/Worker/Runner.pm b/lib/App/Netdisco/Worker/Runner.pm index 34fca0d8..32f4a0e1 100644 --- a/lib/App/Netdisco/Worker/Runner.pm +++ b/lib/App/Netdisco/Worker/Runner.pm @@ -45,8 +45,8 @@ sub run { my $no = (exists $stanza->{no} ? $stanza->{no} : undef); my $only = (exists $stanza->{only} ? $stanza->{only} : undef); - next if $no and check_acl_no($job->device->ip, $no); - next if $only and not check_acl_only($job->device->ip, $only); + next if $no and check_acl_no($job->device, $no); + next if $only and not check_acl_only($job->device, $only); push @newuserconf, $stanza; }