1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-06 00:07:44 +01:00
unleash.unleash/src/lib/services
Gastón Fournier c5afa8ff11
fix: unauthorized disable feature (#5982)
## About the changes
This was spotted while testing automated actions. Steps to reproduce:

1. Add an editor user
2. Get a PAT for the editor user
3. As Admin create a feature in a project where the editor user is not a
member and enable the feature
4. Try using the editor's PAT to modify the feature
5. As the editor create a project (you'd be made owner) and try the same
request but just change the project name for the new project just
created (don't change anything else)

**Expected behavior**: you can't disable the feature
**Actual behavior**: the feature is disabled

This does not happen when trying to turn on a flag because during the
turn-on process we do validate if the feature belongs to project when we
call updateStrategy:
c18a7c0dc2/src/lib/features/feature-toggle/feature-toggle-service.ts (L1751-L1764)
2024-01-22 12:50:14 +01:00
..
access-service.test.ts chore: centralize events service creation (#5910) 2024-01-16 13:11:28 +01:00
access-service.ts fix: unauthorized disable feature (#5982) 2024-01-22 12:50:14 +01:00
account-service.ts fix(import): making all imports relative and removing baseUrl (#5847) 2024-01-17 15:33:03 +02:00
addon-schema.ts
addon-service-test-simple-addon.ts
addon-service.test.ts chore: re use extract user methods (#5947) 2024-01-18 13:15:21 +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 chore: re use extract user methods (#5947) 2024-01-18 13:15:21 +01:00
api-token-service.ts chore: re use extract user methods (#5947) 2024-01-18 13:15:21 +01:00
client-spec-service.test.ts
client-spec-service.ts
context-schema.ts
context-service.ts chore: re use extract user methods (#5947) 2024-01-18 13:15:21 +01:00
edge-service.ts
email-service.test.ts
email-service.ts fix: make the conflcit email template button conditionally render (#5931) 2024-01-17 13:26:07 +00:00
event-announcer-service.ts
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 chore: re use extract user methods (#5947) 2024-01-18 13:15:21 +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 chore: re use extract user methods (#5947) 2024-01-18 13:15:21 +01:00
openapi-service.ts
pat-service.ts chore: re use extract user methods (#5947) 2024-01-18 13:15:21 +01:00
project-health-service.ts
project-schema.ts
project-service.ts chore: re use extract user methods (#5947) 2024-01-18 13:15:21 +01:00
proxy-service.ts chore: add no unused imports biome rule (#5855) 2024-01-11 12:44:05 +00:00
public-signup-token-service.ts chore: re use extract user methods (#5947) 2024-01-18 13:15:21 +01:00
reset-token-service.ts Biome1.5.1 (#5867) 2024-01-12 09:25:59 +00:00
scheduler-service.test.ts chore: re use extract user methods (#5947) 2024-01-18 13:15:21 +01:00
segment-schema.ts
segment-service.ts chore: re use extract user methods (#5947) 2024-01-18 13:15:21 +01:00
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: re use extract user methods (#5947) 2024-01-18 13:15:21 +01:00
state-service.ts chore: re use extract user methods (#5947) 2024-01-18 13:15:21 +01:00
state-util.ts Biome1.5.1 (#5867) 2024-01-12 09:25:59 +00:00
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
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
user-service.test.ts chore: re use extract user methods (#5947) 2024-01-18 13:15:21 +01:00
user-service.ts chore: re use extract user methods (#5947) 2024-01-18 13:15:21 +01:00
user-splash-service.ts
version-service.test.ts
version-service.ts fix(import): making all imports relative and removing baseUrl (#5847) 2024-01-17 15:33:03 +02:00