NAME
App::Netdisco::Util::Permission
DESCRIPTION
Helper subroutines to support parts of the Netdisco application.
There are no default exports, however the :all
tag will export all subroutines.
EXPORT_OK
check_acl_no( $ip | $instance, $setting_name | $acl_entry | \@acl )
Given an IP address or object instance, returns true if the configuration setting $setting_name
matches, else returns false. If the content of the setting is undefined or empty, then check_acl_no
also returns false.
If $setting_name
is a valid setting, then it will be resolved to the access control list, else we assume you passed an ACL entry or ACL.
See the Netdisco wiki for details of what $acl
may contain.
check_acl_only( $ip | $instance, $setting_name | $acl_entry | \@acl )
Given an IP address or object instance, returns true if the configuration setting $setting_name
matches, else returns false. If the content of the setting is undefined or empty, then check_acl_only
also returns true.
If $setting_name
is a valid setting, then it will be resolved to the access control list, else we assume you passed an ACL entry or ACL.
See the Netdisco wiki for details of what $acl
may contain.
check_acl( $ip | $instance, $acl_entry | \@acl )
Given an IP address or object instance, compares it to the items in \@acl
then returns true or false. You can control whether any item must match or all must match, and items can be negated to invert the match logic.
Accepts instances of classes representing Netdisco Devices, Netdisco Device IPs, and NetAddr::IP family objects.
There are several options for what \@acl
may contain. See the Netdisco wiki for the details.