# 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:                 unless name and ip
35:                     raise Puppet::DevError, "Name and IP must be passed to 'allowed?'"
36:                 end
37:                 # else, we're networked and such
38:             else
39:                 # we're local
40:                 return true
41:             end
42: 
43:             # yay insecure overrides
44:             if globalallow?
45:                 return true
46:             end
47: 
48:             if decl = declarations.find { |d| d.match?(name, ip) }
49:                 return decl.result
50:             end
51: 
52:             self.info "defaulting to no access for %s" % name
53:             return false
54:         end