mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-06 00:07:44 +01:00
55da9b8133
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. |
||
---|---|---|
.. | ||
access-service.test.ts | ||
access-service.ts | ||
account-service.ts | ||
addon-schema.ts | ||
addon-service-test-simple-addon.ts | ||
addon-service.test.ts | ||
addon-service.ts | ||
api-token-service.test.ts | ||
api-token-service.ts | ||
client-spec-service.test.ts | ||
client-spec-service.ts | ||
context-schema.ts | ||
context-service.ts | ||
edge-service.ts | ||
email-service.test.ts | ||
email-service.ts | ||
event-announcer-service.ts | ||
event-service.ts | ||
favorites-service.ts | ||
feature-service-potentially-stale.test.ts | ||
feature-tag-service.ts | ||
feature-type-service.ts | ||
group-service.ts | ||
health-service.ts | ||
index.ts | ||
openapi-service.ts | ||
pat-service.ts | ||
project-health-service.ts | ||
project-schema.ts | ||
public-signup-token-service.ts | ||
reset-token-service.ts | ||
scheduler-service.test.ts | ||
segment-schema.ts | ||
session-service.ts | ||
setting-service.ts | ||
state-schema.ts | ||
state-service-export-v1.json | ||
state-service.test.ts | ||
state-service.ts | ||
state-util.ts | ||
strategy-schema.ts | ||
strategy-service.ts | ||
tag-schema.test.ts | ||
tag-schema.ts | ||
tag-service.ts | ||
tag-type-schema.test.ts | ||
tag-type-schema.ts | ||
user-feedback-service.ts | ||
user-service.test.ts | ||
user-service.ts | ||
user-splash-service.ts | ||
version-service.test.ts | ||
version-service.ts |