|
|
@@ -1,6 +1,7 @@
|
|
|
package grapher
|
|
|
|
|
|
import (
|
|
|
+ "fmt"
|
|
|
"strconv"
|
|
|
)
|
|
|
|
|
|
@@ -285,11 +286,12 @@ func (parsed *ParsedObjs) findRBACTargets(parentID int, yaml map[string]interfac
|
|
|
Target: o.ID,
|
|
|
},
|
|
|
}
|
|
|
-
|
|
|
+ fmt.Println(tr["namespace"], o.Kind, tr["kind"], o.Name, tr["name"])
|
|
|
// first consider case of targets added via subjects, which are namespace scoped.
|
|
|
- if tr["namespace"] != nil && o.Kind == tr["kind"] &&
|
|
|
- o.Name == tr["name"] && (o.Namespace == tr["namespace"] || o.Namespace == "default") {
|
|
|
+ if tr["namespace"] != nil && o.Kind == tr["kind"] && o.Name == tr["name"] &&
|
|
|
+ (o.Namespace == tr["namespace"] || o.Namespace == "default") {
|
|
|
|
|
|
+ fmt.Println("subject", o.Name, tr["kind"])
|
|
|
// Add bidirectional link from children as well.
|
|
|
parsed.Objects[i].Relations.SpecRels = append(parsed.Objects[i].Relations.SpecRels, newrel)
|
|
|
targets = append(targets, o.ID)
|