Skip to content

Commit

Permalink
Prioritize Organization settings
Browse files Browse the repository at this point in the history
Now that the write permissions to the registry are irrelevant, we
need a way for the sysadmin to enforce its configuration on the machine.
To achieve this, we set the org-provided Landscape and Pro settings
as the top layer.
  • Loading branch information
EduardGomezEscandell committed Nov 7, 2023
1 parent c3a3aa1 commit 5517680
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions windows-agent/internal/config/config_source.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ type subscription struct {
}

func (s subscription) resolve() (string, Source) {
if s.Organization != "" {
return s.Organization, SourceRegistry
}

if s.Store != "" {
return s.Store, SourceMicrosoftStore
}
Expand All @@ -34,10 +38,6 @@ func (s subscription) resolve() (string, Source) {
return s.User, SourceUser
}

if s.Organization != "" {
return s.Organization, SourceRegistry
}

return "", SourceNone
}

Expand All @@ -50,13 +50,13 @@ type landscapeConf struct {
}

func (p landscapeConf) resolve() (string, Source) {
if p.UserConfig != "" {
return p.UserConfig, SourceUser
}

if p.OrgConfig != "" {
return p.OrgConfig, SourceRegistry
}

if p.UserConfig != "" {
return p.UserConfig, SourceUser
}

return "", SourceNone
}

0 comments on commit 5517680

Please sign in to comment.