RecordingAuthorizer wraps any rbac.Authorizer and records all Authorize() calls made. This is useful for testing as these calls can later be asserted.
| 156 | // RecordingAuthorizer wraps any rbac.Authorizer and records all Authorize() |
| 157 | // calls made. This is useful for testing as these calls can later be asserted. |
| 158 | type RecordingAuthorizer struct { |
| 159 | sync.RWMutex |
| 160 | Called []AuthCall |
| 161 | Wrapped rbac.Authorizer |
| 162 | } |
| 163 | |
| 164 | type ActionObjectPair struct { |
| 165 | Action policy.Action |
nothing calls this directly
no outgoing calls
no test coverage detected