@@ -638,7 +638,7 @@ func (r *RecordingAuthorizer) AssertActor(t *testing.T, actor rbac.Subject, did
638
638
assert .Equalf (t , len (did ), ptr , "assert actor: didn't find all actions, %d missing actions" , len (did )- ptr )
639
639
}
640
640
641
- func (r * RecordingAuthorizer ) RecordAuthorize (ctx context. Context , subject rbac.Subject , action rbac.Action , object rbac.Object ) {
641
+ func (r * RecordingAuthorizer ) RecordAuthorize (subject rbac.Subject , action rbac.Action , object rbac.Object ) {
642
642
r .Lock ()
643
643
defer r .Unlock ()
644
644
r .Called = append (r .Called , authCall {
@@ -649,7 +649,7 @@ func (r *RecordingAuthorizer) RecordAuthorize(ctx context.Context, subject rbac.
649
649
}
650
650
651
651
func (r * RecordingAuthorizer ) Authorize (ctx context.Context , subject rbac.Subject , action rbac.Action , object rbac.Object ) error {
652
- r .RecordAuthorize (ctx , subject , action , object )
652
+ r .RecordAuthorize (subject , action , object )
653
653
if r .Wrapped == nil {
654
654
panic ("Developer error: RecordingAuthorizer.Wrapped is nil" )
655
655
}
@@ -705,7 +705,7 @@ func (s *PreparedRecorder) Authorize(ctx context.Context, object rbac.Object) er
705
705
defer s .rw .Unlock ()
706
706
707
707
if ! s .usingSQL {
708
- s .rec .RecordAuthorize (ctx , s .subject , s .action , object )
708
+ s .rec .RecordAuthorize (s .subject , s .action , object )
709
709
}
710
710
return s .prepped .Authorize (ctx , object )
711
711
}
@@ -731,7 +731,7 @@ func (f *fakePreparedAuthorizer) Authorize(ctx context.Context, object rbac.Obje
731
731
732
732
// CompileToSQL returns a compiled version of the authorizer that will work for
733
733
// in memory databases. This fake version will not work against a SQL database.
734
- func (f * fakePreparedAuthorizer ) CompileToSQL (_ context.Context , _ regosql.ConvertConfig ) (string , error ) {
734
+ func (* fakePreparedAuthorizer ) CompileToSQL (_ context.Context , _ regosql.ConvertConfig ) (string , error ) {
735
735
return "not a valid sql string" , nil
736
736
}
737
737
@@ -746,10 +746,6 @@ func (d *FakeAuthorizer) Authorize(_ context.Context, _ rbac.Subject, _ rbac.Act
746
746
return d .AlwaysReturn
747
747
}
748
748
749
- func (d * FakeAuthorizer ) CompileToSQL (_ context.Context , _ regosql.ConvertConfig ) (string , error ) {
750
- return "not a valid sql string" , nil
751
- }
752
-
753
749
func (d * FakeAuthorizer ) Prepare (_ context.Context , subject rbac.Subject , action rbac.Action , _ string ) (rbac.PreparedAuthorized , error ) {
754
750
return & fakePreparedAuthorizer {
755
751
Original : d ,
0 commit comments