Skip to content

Commit

Permalink
Fix 2 small mistakes in envoy error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
darh committed Jul 12, 2021
1 parent 92d2de8 commit 0a241fa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion pkg/envoy/store/rbac_rule_marshal.go
Expand Up @@ -189,14 +189,15 @@ func (n *rbacRule) Encode(ctx context.Context, pl *payload) (err error) {
// return resource.ComposeNamespaceErrUnresolved(n.res.RefPath[1].Identifiers)
//}

////
//p2 := resource.FindComposeRecord(pl.state.ParentResources, n.res.RefResource.Identifiers)
//if p2 == nil {
// return resource.ComposeNamespaceErrUnresolved(n.res.RefResource.Identifiers)
//}
//
//res.Resource = composeTypes.RecordRbacResource(p0.ID, p1.ID, p2.ID)
case composeTypes.ModuleFieldResourceType:
return fmt.Errorf("importing rbac rules on record level is not supported")
return fmt.Errorf("importing rbac rules on module field level is not supported")
//p0 := resource.FindComposeNamespace(pl.state.ParentResources, n.res.RefPath[0].Identifiers)
//if p0 == nil {
// return resource.ComposeNamespaceErrUnresolved(n.res.RefPath[0].Identifiers)
Expand Down
2 changes: 1 addition & 1 deletion pkg/envoy/yaml/rbac_rules_marshal.go
Expand Up @@ -138,7 +138,7 @@ func (r *rbacRule) Encode(ctx context.Context, doc *Document, state *envoy.Resou
case composeTypes.RecordResourceType:
return fmt.Errorf("importing rbac rules on record level is not supported")
case composeTypes.ModuleFieldResourceType:
return fmt.Errorf("importing rbac rules on record level is not supported")
return fmt.Errorf("importing rbac rules on module field level is not supported")
case systemTypes.UserResourceType:
if res.RefResource != nil {
p1 := resource.FindUser(state.ParentResources, res.RefResource.Identifiers)
Expand Down

0 comments on commit 0a241fa

Please sign in to comment.