# File lib/puppet/network/authstore.rb, line 29
29:     def allowed?(name, ip)
30:       if name or ip
31:         # This is probably unnecessary, and can cause some weirdnesses in
32:         # cases where we're operating over localhost but don't have a real
33:         # IP defined.
34:         raise Puppet::DevError, "Name and IP must be passed to 'allowed?'" unless name and ip
35:         # else, we're networked and such
36:       else
37:         # we're local
38:         return true
39:       end
40: 
41:       # yay insecure overrides
42:       return true if globalallow?
43: 
44:       if decl = declarations.find { |d| d.match?(name, ip) }
45:         return decl.result
46:       end
47: 
48:       info "defaulting to no access for #{name}"
49:       false
50:     end