mirror of
https://github.com/netbirdio/netbird.git
synced 2024-11-26 01:53:42 +01:00
Fix user cache lookup filtering for service users (#849)
This commit is contained in:
parent
6f2c4078ef
commit
e4c28f64fa
@ -902,8 +902,10 @@ func (am *DefaultAccountManager) lookupUserInCacheByEmail(email string, accountI
|
|||||||
func (am *DefaultAccountManager) lookupUserInCache(userID string, account *Account) (*idp.UserData, error) {
|
func (am *DefaultAccountManager) lookupUserInCache(userID string, account *Account) (*idp.UserData, error) {
|
||||||
users := make(map[string]struct{}, len(account.Users))
|
users := make(map[string]struct{}, len(account.Users))
|
||||||
for _, user := range account.Users {
|
for _, user := range account.Users {
|
||||||
|
if !user.IsServiceUser {
|
||||||
users[user.Id] = struct{}{}
|
users[user.Id] = struct{}{}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
log.Debugf("looking up user %s of account %s in cache", userID, account.Id)
|
log.Debugf("looking up user %s of account %s in cache", userID, account.Id)
|
||||||
userData, err := am.lookupCache(users, account.Id)
|
userData, err := am.lookupCache(users, account.Id)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user