@@ -131,9 +131,6 @@ func (a RegoAuthorizer) ByRoleName(ctx context.Context, subjectID string, roleNa
131
131
// Authorize allows passing in custom Roles.
132
132
// This is really helpful for unit testing, as we can create custom roles to exercise edge cases.
133
133
func (a RegoAuthorizer ) Authorize (ctx context.Context , subjectID string , roles []Role , scope Role , action Action , object Object ) error {
134
- ctx , span := tracing .StartSpan (ctx )
135
- defer span .End ()
136
-
137
134
input := map [string ]interface {}{
138
135
"subject" : authSubject {
139
136
ID : subjectID ,
@@ -179,9 +176,6 @@ func (a RegoAuthorizer) Authorize(ctx context.Context, subjectID string, roles [
179
176
// Prepare will partially execute the rego policy leaving the object fields unknown (except for the type).
180
177
// This will vastly speed up performance if batch authorization on the same type of objects is needed.
181
178
func (RegoAuthorizer ) Prepare (ctx context.Context , subjectID string , roles []Role , scope Role , action Action , objectType string ) (* PartialAuthorizer , error ) {
182
- ctx , span := tracing .StartSpan (ctx )
183
- defer span .End ()
184
-
185
179
auth , err := newPartialAuthorizer (ctx , subjectID , roles , scope , action , objectType )
186
180
if err != nil {
187
181
return nil , xerrors .Errorf ("new partial authorizer: %w" , err )
@@ -191,9 +185,6 @@ func (RegoAuthorizer) Prepare(ctx context.Context, subjectID string, roles []Rol
191
185
}
192
186
193
187
func (a RegoAuthorizer ) PrepareByRoleName (ctx context.Context , subjectID string , roleNames []string , scope Scope , action Action , objectType string ) (PreparedAuthorized , error ) {
194
- ctx , span := tracing .StartSpan (ctx )
195
- defer span .End ()
196
-
197
188
roles , err := RolesByNames (roleNames )
198
189
if err != nil {
199
190
return nil , err
0 commit comments