Skip to content

Commit 84ba18d

Browse files
committed
Add comment
1 parent 6b2c3f9 commit 84ba18d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

coderd/coderdtest/authorize.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,10 @@ func AssertRBAC(t *testing.T, api *coderd.API, client *codersdk.Client) RBACAsse
7070
// AllCalls is for debugging. If you are not sure where calls are coming from,
7171
// call this and use a debugger or print them. They have small callstacks
7272
// on them to help locate the 'Authorize' call.
73+
// Only calls to Authorize by the given subject will be returned.
74+
// Note that duplicate rbac calls are handled by the rbac.Cacher(), but
75+
// will be recorded twice. So AllCalls() returns calls regardless if they
76+
// were returned from the cached or not.
7377
func (a RBACAsserter) AllCalls() []AuthCall {
7478
return a.Recorder.AllCalls(&a.Subject)
7579
}

0 commit comments

Comments
 (0)