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

Method onLogAfterEventInEnforce

util_log.go:135–140  ·  view source on GitHub ↗

onLogAfterEventInEnforce finalizes logging for Enforce operation.

(logEntry *log.LogEntry, allowed bool)

Source from the content-addressed store, hash-verified

133
134// onLogAfterEventInEnforce finalizes logging for Enforce operation.
135func (e *Enforcer) onLogAfterEventInEnforce(logEntry *log.LogEntry, allowed bool) {
136 if e.logger != nil && logEntry != nil {
137 logEntry.Allowed = allowed
138 _ = e.logger.OnAfterEvent(logEntry)
139 }
140}
141
142// logPolicyOperation logs a policy operation (add or remove) with before and after events.
143func (e *Enforcer) logPolicyOperation(eventType log.EventType, sec string, rule []string, operation func() (bool, error)) (bool, error) {

Callers 1

enforceMethod · 0.95

Calls 1

OnAfterEventMethod · 0.65

Tested by

no test coverage detected