Merge pull request #157 from openziti/fix-empty-policy-display

Fix panic when policies have no roles. Fixes GH-156
This commit is contained in:
Paul Lorenz
2020-07-29 16:46:33 -04:00
committed by GitHub
2 changed files with 14 additions and 1 deletions
+8
View File
@@ -1,3 +1,11 @@
# Release 0.15.3
* What's New:
* Bug Fixes:
* [#152](https://github.com/openziti/ziti/issues/152) - Fix ziti-router enroll exit code on failure
* [#156](https://github.com/openziti/ziti/issues/156) - fix display of policies with empty roles lists
# Release 0.15.2
* What's New:
+6 -1
View File
@@ -609,7 +609,12 @@ func outputServicePolicies(o *commonOptions, children []*gabs.Container, pagingI
}
func mapRoleIdsToNames(c *gabs.Container, path string, entityType string) ([]string, error) {
values := c.Path(path).Data().([]interface{})
jsonValues := c.Path(path).Data()
if jsonValues == nil {
return nil, nil
}
values := jsonValues.([]interface{})
var result []string
for _, val := range values {