[management] allow impersonation via pats (#3739)

This commit is contained in:
Pascal Fischer
2025-04-25 16:40:54 +02:00
committed by GitHub
parent dbf81a145e
commit 38ada44a0e
2 changed files with 8 additions and 2 deletions

View File

@@ -242,14 +242,15 @@ func TestAuthMiddleware_Handler_Child(t *testing.T) {
},
},
{
name: "Valid PAT Token ignores child",
name: "Valid PAT Token accesses child",
path: "/test?account=xyz",
authHeader: "Token " + PAT,
expectedUserAuth: &nbcontext.UserAuth{
AccountId: accountID,
AccountId: "xyz",
UserId: userID,
Domain: testAccount.Domain,
DomainCategory: testAccount.DomainCategory,
IsChild: true,
IsPAT: true,
},
},