AllCalls is useful for debugging.
(actor *rbac.Subject)
| 196 | |
| 197 | // AllCalls is useful for debugging. |
| 198 | func (r *RecordingAuthorizer) AllCalls(actor *rbac.Subject) []AuthCall { |
| 199 | r.RLock() |
| 200 | defer r.RUnlock() |
| 201 | |
| 202 | called := make([]AuthCall, 0, len(r.Called)) |
| 203 | for _, c := range r.Called { |
| 204 | if actor != nil && !c.Actor.Equal(*actor) { |
| 205 | continue |
| 206 | } |
| 207 | called = append(called, c) |
| 208 | } |
| 209 | return called |
| 210 | } |
| 211 | |
| 212 | // AssertOutOfOrder asserts that the given actor performed the given action |
| 213 | // on the given objects. It does not care about the order of the calls. |