1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-10-27 11:02:16 +01:00
unleash.unleash/frontend/src/component/admin
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
..
apiToken feat: upgrade AdminAlert to PermissionGuard (#4074) 2023-06-23 13:25:35 +01:00
auth feat: upgrade AdminAlert to PermissionGuard (#4074) 2023-06-23 13:25:35 +01:00
billing feat: upgrade AdminAlert to PermissionGuard (#4074) 2023-06-23 13:25:35 +01:00
cors feat: upgrade AdminAlert to PermissionGuard (#4074) 2023-06-23 13:25:35 +01:00
groups feat: upgrade AdminAlert to PermissionGuard (#4074) 2023-06-23 13:25:35 +01:00
instance-admin fix: ensure rel=noreferrer on target=_blank (#3755) 2023-05-12 09:51:33 +01:00
invoice feat: upgrade AdminAlert to PermissionGuard (#4074) 2023-06-23 13:25:35 +01:00
maintenance feat: upgrade AdminAlert to PermissionGuard (#4074) 2023-06-23 13:25:35 +01:00
menu feat: roles unification (#3999) 2023-06-19 09:41:40 +01:00
network fix: dark theme UI fixes (#3423) 2023-03-30 16:57:35 +01:00
roles feat: upgrade AdminAlert to PermissionGuard (#4074) 2023-06-23 13:25:35 +01:00
serviceAccounts feat: upgrade AdminAlert to PermissionGuard (#4074) 2023-06-23 13:25:35 +01:00
users feat: upgrade AdminAlert to PermissionGuard (#4074) 2023-06-23 13:25:35 +01:00
Admin.tsx feat: roles unification (#3999) 2023-06-19 09:41:40 +01:00
AdminRedirect.tsx Refactor/lazy load (#2842) 2023-01-12 11:34:45 +01:00
LazyAdmin.tsx Refactor/lazy load (#2842) 2023-01-12 11:34:45 +01:00
LazyAdminExport.tsx Refactor/lazy load (#2842) 2023-01-12 11:34:45 +01:00