Improve Account cache reload condition (#1319)

To take in consideration that cache may know more users
This commit is contained in:
Yury Gargay
2023-11-20 12:05:32 +01:00
committed by GitHub
parent 52b5a31058
commit 67906f6da5
2 changed files with 8 additions and 2 deletions
+1 -1
View File
@@ -896,7 +896,7 @@ func (am *DefaultAccountManager) GetUsersFromAccount(accountID, userID string) (
users := make(map[string]struct{}, len(account.Users))
usersFromIntegration := make([]*idp.UserData, 0)
for _, user := range account.Users {
if user.Issued == UserIssuedIntegration && user.LastLogin.IsZero() {
if user.Issued == UserIssuedIntegration {
key := user.IntegrationReference.CacheKey(accountID, user.Id)
info, err := am.externalCacheManager.Get(am.ctx, key)
if err != nil {