MCPcopy
hub / github.com/apache/casbin / HasPolicy

Method HasPolicy

enforcer_synced.go:352–356  ·  view source on GitHub ↗

HasPolicy determines whether an authorization rule exists.

(params ...interface{})

Source from the content-addressed store, hash-verified

350
351// HasPolicy determines whether an authorization rule exists.
352func (e *SyncedEnforcer) HasPolicy(params ...interface{}) (bool, error) {
353 e.m.RLock()
354 defer e.m.RUnlock()
355 return e.Enforcer.HasPolicy(params...)
356}
357
358// HasNamedPolicy determines whether a named authorization rule exists.
359func (e *SyncedEnforcer) HasNamedPolicy(ptype string, params ...interface{}) (bool, error) {

Callers

nothing calls this directly

Calls 1

HasPolicyMethod · 0.65

Tested by

no test coverage detected