revert change as check_acl_only is the right way to go
This commit is contained in:
@@ -5,7 +5,7 @@ use App::Netdisco::Worker::Plugin;
|
|||||||
use aliased 'App::Netdisco::Worker::Status';
|
use aliased 'App::Netdisco::Worker::Status';
|
||||||
|
|
||||||
use App::Netdisco::Transport::SNMP ();
|
use App::Netdisco::Transport::SNMP ();
|
||||||
use App::Netdisco::Util::Permission 'check_acl_no';
|
use App::Netdisco::Util::Permission qw/check_acl_no check_acl_only/;
|
||||||
use App::Netdisco::Util::FastResolver 'hostnames_resolve_async';
|
use App::Netdisco::Util::FastResolver 'hostnames_resolve_async';
|
||||||
use App::Netdisco::Util::Device 'get_device';
|
use App::Netdisco::Util::Device 'get_device';
|
||||||
use App::Netdisco::Util::DNS 'hostname_from_ip';
|
use App::Netdisco::Util::DNS 'hostname_from_ip';
|
||||||
@@ -66,7 +66,7 @@ register_worker({ phase => 'early', driver => 'snmp' }, sub {
|
|||||||
my $protect = setting('snmp_field_protection')->{'device'} || {};
|
my $protect = setting('snmp_field_protection')->{'device'} || {};
|
||||||
my %dirty = $device->get_dirty_columns;
|
my %dirty = $device->get_dirty_columns;
|
||||||
foreach my $field (keys %dirty) {
|
foreach my $field (keys %dirty) {
|
||||||
next unless check_acl_no($ip, $protect->{$field});
|
next unless check_acl_only($ip, $protect->{$field});
|
||||||
if (!defined $dirty{$field} or $dirty{$field} eq '') {
|
if (!defined $dirty{$field} or $dirty{$field} eq '') {
|
||||||
return $job->cancel("discover cancelled: $ip failed to return valid $field");
|
return $job->cancel("discover cancelled: $ip failed to return valid $field");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user