Skip to content

Commit

Permalink
Fix the bug that prevented existing addons to be enabled after spec u…
Browse files Browse the repository at this point in the history
…pdate
  • Loading branch information
shleikes committed Oct 13, 2024
1 parent 4394756 commit 9836e0f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions protocol/chainlib/base_chain_parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -242,11 +242,12 @@ func (bcp *BaseChainParser) Construct(spec spectypes.Spec, internalPaths map[str
bcp.verifications = verifications
allowedAddons := map[string]bool{}
allowedExtensions := map[string]struct{}{}
for _, apoCollection := range apiCollections {
for _, extension := range apoCollection.Extensions {
for _, apiCollection := range apiCollections {
for _, extension := range apiCollection.Extensions {
allowedExtensions[extension.Name] = struct{}{}
}
allowedAddons[apoCollection.CollectionData.AddOn] = false
// if addon was already existing (happens on spec update), use the existing policy, otherwise set it to false by default
allowedAddons[apiCollection.CollectionData.AddOn] = bcp.allowedAddons[apiCollection.CollectionData.AddOn]
}
bcp.allowedAddons = allowedAddons

Expand Down

0 comments on commit 9836e0f

Please sign in to comment.