1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-12-22 19:07:54 +01:00
unleash.unleash/frontend/src
Nuno Góis 95a0c7748f
feat: upgrade AdminAlert to PermissionGuard (#4074)
https://linear.app/unleash/issue/2-1165/improve-adminalert-usage-to-be-more-generic-accept-non-admin

Upgrades our `AdminAlert` to a new `PermissionGuard`.

**Question**: We don't **need** to, but **should** we be specific about
the `ADMIN` permission every time?
Technically `PermissionGuard` could have `permissions` as optional and
assume `[]` by default, which will add `ADMIN` anyways. However, I feel
like we may gain some readability if we're specific about it. WDYT?

Single permission:

![image](https://github.com/Unleash/unleash/assets/14320932/eab414ae-e798-4ab6-ba96-cde2977dc98b)

Multiple permissions:

![image](https://github.com/Unleash/unleash/assets/14320932/25302442-8fcc-4aa1-9525-d54f5f9350af)
2023-06-23 13:25:35 +01:00
..
__mocks__
assets
component feat: upgrade AdminAlert to PermissionGuard (#4074) 2023-06-23 13:25:35 +01:00
constants
contexts refactor: token permissions, drop admin-like permissions (#4050) 2023-06-22 08:35:54 +01:00
hooks feat: count number of combinations from playground (#4077) 2023-06-23 09:29:13 +00:00
interfaces Splitted strategy button (#4025) 2023-06-21 15:26:07 +02:00
openapi chore: update orval models (#4062) 2023-06-22 09:52:21 +00:00
themes
types
utils feat: roles unification (#3999) 2023-06-19 09:41:40 +01:00
index.tsx
setupTests.ts
vite-env.d.ts