authorize: fix user caching (#3734)

This commit is contained in:
Caleb Doxsey 2022-11-08 08:23:41 -07:00 committed by GitHub
parent 20d4a7520e
commit e1f881f82b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 58 additions and 3 deletions

View file

@ -90,12 +90,11 @@ func (a *Authorize) getDataBrokerSessionOrServiceAccount(
func (a *Authorize) getDataBrokerUser(
ctx context.Context,
userID string,
dataBrokerRecordVersion uint64,
) (*user.User, error) {
ctx, span := trace.StartSpan(ctx, "authorize.getDataBrokerUser")
defer span.End()
record, err := getDataBrokerRecord(ctx, grpcutil.GetTypeURL(new(user.User)), userID, dataBrokerRecordVersion)
record, err := getDataBrokerRecord(ctx, grpcutil.GetTypeURL(new(user.User)), userID, 0)
if err != nil {
return nil, err
}