3
0

Fix 2 small mistakes in envoy error messages

This commit is contained in:
Denis Arh
2021-07-09 16:56:33 +02:00
parent 92d2de8639
commit 0a241fab3e
2 changed files with 3 additions and 2 deletions
+2 -1
View File
@@ -189,6 +189,7 @@ 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)
@@ -196,7 +197,7 @@ func (n *rbacRule) Encode(ctx context.Context, pl *payload) (err error) {
//
//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)
+1 -1
View File
@@ -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)