1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-10-13 11:17:26 +02:00
unleash.unleash/frontend/src/component/admin/cors
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
..
CorsForm.test.tsx feat: add CORS instance settings (#1239) 2022-08-23 14:04:09 +02:00
CorsForm.tsx clear warnings (#3053) 2023-02-07 08:41:23 +01:00
CorsHelpAlert.tsx Fix/remove settings cache (#2694) 2022-12-14 17:35:22 +01:00
index.tsx feat: upgrade AdminAlert to PermissionGuard (#4074) 2023-06-23 13:25:35 +01:00