This commit is contained in:
Jarek Kowalski
2018-02-20 22:47:40 -08:00
parent 92330ac247
commit 2a72a57dc8
2 changed files with 2 additions and 2 deletions

View File

@@ -39,7 +39,7 @@ func (m *PolicyManager) GetEffectivePolicy(si SourceInfo) (*Policy, error) {
md = append(md, m.repository.Manifests.Find(labelsForSource(SourceInfo{Host: si.Host}))...)
// Global policy.
md = append(md, m.repository.Manifests.Find(labelsForSource(SourceInfo{}))...)
md = append(md, m.repository.Manifests.Find(labelsForSource(GlobalPolicySourceInfo))...)
var policies []*Policy
for _, em := range md {

View File

@@ -32,7 +32,7 @@ func (ssi SourceInfo) String() string {
// or may be 'username@host:path' where path, username and host are not processed.
func ParseSourceInfo(path string, hostname string, username string) (SourceInfo, error) {
if path == "(global)" {
return SourceInfo{}, nil
return GlobalPolicySourceInfo, nil
}
p1 := strings.Index(path, "@")