mirror of
https://github.com/netbirdio/netbird.git
synced 2026-08-30 19:41:30 +02:00
The account status gate pushed ValidateSession to 115 lines of code, past the 100 the quality gate allows. Session token verification and the checks that run against a user of the service's own account move into named helpers, and the denials raised before a user is resolved share one constructor. An account mismatch keeps its bare response: the user belongs to a different account, so none of their identity belongs in an answer to this service's proxy. Tests assert denied reasons through the package constants, with the wire values pinned in one place so a rename has to be deliberate.