MCPcopy Create free account
hub / github.com/dim-an/cod / GetExecutablePolicy

Method GetExecutablePolicy

server/user_configuration.go:87–95  ·  view source on GitHub ↗
(executablePath string)

Source from the content-addressed store, hash-verified

85}
86
87func (cfg *UserConfiguration) GetExecutablePolicy(executablePath string) datastore.Policy {
88 for _, rule := range cfg.Rules {
89 ok := rule.compiledGlob.MatchString(executablePath)
90 if ok {
91 return rule.Policy
92 }
93 }
94 return datastore.PolicyUnknown
95}

Callers 1

Calls 1

MatchStringMethod · 0.65

Tested by

no test coverage detected