mirror of
https://github.com/netbirdio/netbird.git
synced 2025-06-20 09:47:49 +02:00
Avoid categorization on incoming claim (#1086)
This prevents domain categorization on claims of invited users
This commit is contained in:
parent
01f2b0ecb7
commit
4572c6c1f8
@ -1420,7 +1420,7 @@ func (am *DefaultAccountManager) getAccountWithAuthorizationClaims(claims jwtcla
|
|||||||
if _, ok := accountFromID.Users[claims.UserId]; !ok {
|
if _, ok := accountFromID.Users[claims.UserId]; !ok {
|
||||||
return nil, fmt.Errorf("user %s is not part of the account id %s", claims.UserId, claims.AccountId)
|
return nil, fmt.Errorf("user %s is not part of the account id %s", claims.UserId, claims.AccountId)
|
||||||
}
|
}
|
||||||
if accountFromID.DomainCategory == PrivateCategory || claims.DomainCategory != PrivateCategory {
|
if accountFromID.DomainCategory == PrivateCategory || claims.DomainCategory != PrivateCategory || accountFromID.Domain != claims.Domain {
|
||||||
return accountFromID, nil
|
return accountFromID, nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user