AddNamedGroupingPolicies adds named role inheritance rules to the current policy. If the rule already exists, the function returns false for the corresponding policy rule and the rule will not be added. Otherwise the function returns true for the corresponding policy rule by adding the new rule.
(ptype string, rules [][]string)
| 409 | // If the rule already exists, the function returns false for the corresponding policy rule and the rule will not be added. |
| 410 | // Otherwise the function returns true for the corresponding policy rule by adding the new rule. |
| 411 | func (e *Enforcer) AddNamedGroupingPolicies(ptype string, rules [][]string) (bool, error) { |
| 412 | return e.addPolicies("g", ptype, rules, false) |
| 413 | } |
| 414 | |
| 415 | // AddNamedGroupingPoliciesEx adds named role inheritance rules to the current policy. |
| 416 | // If the rule already exists, the rule will not be added. |