Ghost/ghost/members-api/test/unit/lib
Naz 02a0fd5a32 Fixed source attribution for staff token API requests
closes https://github.com/TryGhost/Toolbox/issues/386

- When the API request was made using staff token the source attribution was "user" instead of "api". Misattribution caused ripple effects in  limit service.
- The fix also adds a new combination of data available on the  `req` object - both `user` and `api_key` can be present when the request is done using a staff (user) token. Having both pieces of data on the request object gives more context for business logic, did not find a good reason to keep it "pure" with either `api_key` or `user` property.
2022-08-23 14:38:46 +08:00
..
controllers/member Restricted changing Subscription to archived Tier 2022-01-21 14:08:31 +02:00
repositories Fixed source attribution for staff token API requests 2022-08-23 14:38:46 +08:00
services Added test coverage for JWKS token verification 2022-05-23 17:59:33 +08:00
geolocation.test.js Refactor members-api (#231) 2021-01-18 13:55:40 +00:00