HasPolicy determines whether an authorization rule exists.
(params ...interface{})
| 213 | |
| 214 | // HasPolicy determines whether an authorization rule exists. |
| 215 | func (e *Enforcer) HasPolicy(params ...interface{}) (bool, error) { |
| 216 | return e.HasNamedPolicy("p", params...) |
| 217 | } |
| 218 | |
| 219 | // HasNamedPolicy determines whether a named authorization rule exists. |
| 220 | func (e *Enforcer) HasNamedPolicy(ptype string, params ...interface{}) (bool, error) { |