AddPolicies adds authorization rules to the current 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 rule by adding the new rule.
(rules [][]string)
| 241 | // If the rule already exists, the function returns false for the corresponding rule and the rule will not be added. |
| 242 | // Otherwise the function returns true for the corresponding rule by adding the new rule. |
| 243 | func (e *Enforcer) AddPolicies(rules [][]string) (bool, error) { |
| 244 | return e.AddNamedPolicies("p", rules) |
| 245 | } |
| 246 | |
| 247 | // AddPoliciesEx adds authorization rules to the current policy. |
| 248 | // If the rule already exists, the rule will not be added. |