AddNamedPolicies adds authorization rules to the current named policy. If the rule already exists, the function returns false for the corresponding rule and the rule will not be added. Otherwise the function returns true for the corresponding by adding the new rule.
(ptype string, rules [][]string)
| 271 | // If the rule already exists, the function returns false for the corresponding rule and the rule will not be added. |
| 272 | // Otherwise the function returns true for the corresponding by adding the new rule. |
| 273 | func (e *Enforcer) AddNamedPolicies(ptype string, rules [][]string) (bool, error) { |
| 274 | return e.addPolicies("p", ptype, rules, false) |
| 275 | } |
| 276 | |
| 277 | // AddNamedPoliciesEx adds authorization rules to the current named policy. |
| 278 | // If the rule already exists, the rule will not be added. |
no test coverage detected