1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-25 00:07:47 +01:00
unleash.unleash/src/lib/db
Christopher Kolstad e9d9db17fe
feat: Adding Project access requires same role (#6270)
In order to prevent users from being able to assign roles/permissions
they don't have, this PR adds a check that the user performing the
action either is Admin, Project owner or has the same role they are
trying to grant/add.

This addAccess method is only used from Enterprise, so there will be a
separate PR there, updating how we return the roles list for a user, so
that our frontend can only present the roles a user is actually allowed
to grant.

This adds the validation to the backend to ensure that even if the
frontend thinks we're allowed to add any role to any user here, the
backend can be smart enough to stop it.

We should still update frontend as well, so that it doesn't look like we
can add roles we won't be allowed to.
2024-02-20 15:56:53 +01:00
..
access-store.test.ts fix(import): making all imports relative and removing baseUrl (#5847) 2024-01-17 15:33:03 +02:00
access-store.ts feat: Adding Project access requires same role (#6270) 2024-02-20 15:56:53 +01:00
account-store.ts
addon-store.ts
api-token-store.ts
client-applications-store.ts chore(deps): update dependency @biomejs/biome to v1.4.1 (#5709) 2024-01-10 09:11:49 +00:00
client-instance-store.ts fix: Use knex whereLike instead of whereRaw to fix escaping (#6041) 2024-01-26 10:44:53 +01:00
context-field-store.ts
db-pool.ts
db.ts
event-store.ts chore: re use extract user methods (#5947) 2024-01-18 13:15:21 +01:00
favorite-features-store.ts
favorite-projects-store.ts
feature-environment-store.ts fix: clone variants (featureEnv and strategy) when cloning an env (#6026) 2024-01-25 10:53:43 +02:00
feature-strategy-store.test.ts Biome1.5.1 (#5867) 2024-01-12 09:25:59 +00:00
feature-tag-store.ts chore: split metrics by request type (#6119) 2024-02-05 09:01:42 +01:00
feature-type-store.ts
group-store.ts
index.ts feat: project applications e2e PoC (#6189) 2024-02-12 16:00:59 +02:00
pat-store.ts refactor: PATs (#6101) 2024-02-01 14:28:46 +00:00
project-stats-store.ts feat: project applications e2e PoC (#6189) 2024-02-12 16:00:59 +02:00
public-signup-token-store.ts
reset-token-store.ts
role-store.ts fix(import): making all imports relative and removing baseUrl (#5847) 2024-01-17 15:33:03 +02:00
segment-store.test.ts chore: remove detectSegmentUsageInChangeRequests flag (#6080) 2024-01-31 17:24:35 +09:00
segment-store.ts chore: remove detectSegmentUsageInChangeRequests flag (#6080) 2024-01-31 17:24:35 +09:00
session-store.ts
setting-store.ts
strategy-store.ts
tag-store.ts
transaction.ts fix(import): making all imports relative and removing baseUrl (#5847) 2024-01-17 15:33:03 +02:00
user-feedback-store.ts
user-splash-store.ts
user-store.ts