mirror of
https://github.com/netbirdio/netbird.git
synced 2025-08-16 01:58:16 +02:00
Check peer expiration after ACL check (#714)
Bug 1: When calculating the network map, peers added by a setup key were falling under expiration logic while they shouldn't. Bug 2: Peers HTTP API didn't return expired peers for non-admin users because of the expired peer check in the ACL logic. The fix applies peer expiration checks outside of the ACL logic.
This commit is contained in:
@ -55,6 +55,7 @@ func TestPeer_LoginExpired(t *testing.T) {
|
||||
peer := &Peer{
|
||||
LoginExpirationEnabled: c.expirationEnabled,
|
||||
LastLogin: c.lastLogin,
|
||||
UserID: userID,
|
||||
}
|
||||
|
||||
expired, _ := peer.LoginExpired(c.accountSettings.PeerLoginExpiration)
|
||||
|
Reference in New Issue
Block a user