Extend CORS headers to include X-Customer-Number and add customer context in subuser grants.

This commit is contained in:
Jeppe Bundgaard
2026-02-12 18:12:29 +01:00
parent 05a4943162
commit aae244887f
5 changed files with 7 additions and 6 deletions
@@ -577,6 +577,7 @@ class subusersRoute
"phone" => $subuser->phone->value() !== null ? (int)$subuser->phone->value() : null,
"grants" => array_map(function ($grant) {
return [
'name' => (new users_o())->getCustomerName((int)$grant['billing_customer_number']),
'billing_customer_number' => (int)$grant['billing_customer_number'],
'permissions' => json_decode($grant['permissions'], true) ?: [],
];