BuildIncrementalConditionalRoleLinks provides incremental build the role inheritance relations.
(condRmMap map[string]rbac.ConditionalRoleManager, op PolicyOp, sec string, ptype string, rules [][]string)
| 64 | |
| 65 | // BuildIncrementalConditionalRoleLinks provides incremental build the role inheritance relations. |
| 66 | func (model Model) BuildIncrementalConditionalRoleLinks(condRmMap map[string]rbac.ConditionalRoleManager, op PolicyOp, sec string, ptype string, rules [][]string) error { |
| 67 | if sec == "g" && condRmMap[ptype] != nil { |
| 68 | _, err := model.GetAssertion(sec, ptype) |
| 69 | if err != nil { |
| 70 | return err |
| 71 | } |
| 72 | return model[sec][ptype].buildIncrementalConditionalRoleLinks(condRmMap[ptype], op, rules) |
| 73 | } |
| 74 | return nil |
| 75 | } |
| 76 | |
| 77 | // BuildConditionalRoleLinks initializes the roles in RBAC. |
| 78 | func (model Model) BuildConditionalRoleLinks(condRmMap map[string]rbac.ConditionalRoleManager) error { |
nothing calls this directly
no test coverage detected