1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-06 00:07:44 +01:00
unleash.unleash/src/lib/services
Christopher Kolstad 55da9b8133
fix: admin token requests does not automatically have id (#6501)
To check that users do indeed have permissions to update the roles from
project-service, we've been depending on req.user.id.
We had one error on Friday March 8th, where we managed to send
undefined/null to a method that requires a number. This PR assumes that
if we have an API token, and we have admin permissions and userId is not
set we're a legacy admin token.

It uses the util method for extractUserId(req: IAuthRequest | IApiRequest), so if we've passed through the apiTokenMiddleware first, we'll have userId -42, if we haven't, we'll get -1337.
2024-03-12 10:39:37 +01:00
..
access-service.test.ts chore: clean up customRootRolesKillSwitch (#6173) 2024-02-09 08:41:40 +00:00
access-service.ts fix: admin token requests does not automatically have id (#6501) 2024-03-12 10:39:37 +01:00
account-service.ts
addon-schema.ts
addon-service-test-simple-addon.ts
addon-service.test.ts chore: scheduled created-by migrations metrics (#6089) 2024-01-31 12:30:42 +01:00
addon-service.ts chore: re use extract user methods (#5947) 2024-01-18 13:15:21 +01:00
api-token-service.test.ts feat: allow api token middleware to fetch from db (#6344) 2024-02-27 16:08:44 +01:00
api-token-service.ts feat: allow api token middleware to fetch from db (#6344) 2024-02-27 16:08:44 +01:00
client-spec-service.test.ts
client-spec-service.ts
context-schema.ts
context-service.ts feat: project applications e2e PoC (#6189) 2024-02-12 16:00:59 +02:00
edge-service.ts chore: memoizee active tokens (#6135) 2024-02-06 15:14:08 +01:00
email-service.test.ts
email-service.ts chore: extract and export type used by CR emails (#6234) 2024-02-14 10:38:13 +09:00
event-announcer-service.ts chore: adds killswitch to scheduled per sec caches (#6291) 2024-02-21 10:12:23 +01:00
event-service.ts chore: re use extract user methods (#5947) 2024-01-18 13:15:21 +01:00
favorites-service.ts chore: re use extract user methods (#5947) 2024-01-18 13:15:21 +01:00
feature-service-potentially-stale.test.ts refactor: segment in feature oriented architecture (#6434) 2024-03-05 14:45:41 +01:00
feature-tag-service.ts chore: re use extract user methods (#5947) 2024-01-18 13:15:21 +01:00
feature-type-service.ts chore: re use extract user methods (#5947) 2024-01-18 13:15:21 +01:00
group-service.ts chore: re use extract user methods (#5947) 2024-01-18 13:15:21 +01:00
health-service.ts
index.ts refactor: rename proxy to frontend api (#6502) 2024-03-11 17:30:46 +01:00
openapi-service.ts
pat-service.ts refactor: PATs (#6101) 2024-02-01 14:28:46 +00:00
project-health-service.ts feat: project applications e2e PoC (#6189) 2024-02-12 16:00:59 +02:00
project-schema.ts
public-signup-token-service.ts chore: re use extract user methods (#5947) 2024-01-18 13:15:21 +01:00
reset-token-service.ts
scheduler-service.test.ts chore: re use extract user methods (#5947) 2024-01-18 13:15:21 +01:00
segment-schema.ts
session-service.ts
setting-service.ts chore: re use extract user methods (#5947) 2024-01-18 13:15:21 +01:00
state-schema.ts
state-service-export-v1.json
state-service.test.ts chore: scheduled created-by migrations metrics (#6089) 2024-01-31 12:30:42 +01:00
state-service.ts refactor: segment in feature oriented architecture (#6434) 2024-03-05 14:45:41 +01:00
state-util.ts
strategy-schema.ts
strategy-service.ts chore: re use extract user methods (#5947) 2024-01-18 13:15:21 +01:00
tag-schema.test.ts
tag-schema.ts chore: automate openapi schema list (#6463) 2024-03-08 14:58:22 +01:00
tag-service.ts chore: re use extract user methods (#5947) 2024-01-18 13:15:21 +01:00
tag-type-schema.test.ts
tag-type-schema.ts
user-feedback-service.ts fix: proxy repository error handling (#6142) 2024-02-06 15:44:25 +01:00
user-service.test.ts chore: re use extract user methods (#5947) 2024-01-18 13:15:21 +01:00
user-service.ts chore: replace systemUser -1 with new -1337 system user (#5999) 2024-01-25 11:19:39 +01:00
user-splash-service.ts
version-service.test.ts fix: version-service should not use process.nextTick (#6124) 2024-02-05 11:24:37 +01:00
version-service.ts fix: version-service should not use process.nextTick (#6124) 2024-02-05 11:24:37 +01:00