From 783a8527c52a111e3a9bae2ee9daa1f693adccbf Mon Sep 17 00:00:00 2001 From: Ieva Date: Tue, 25 Jul 2023 13:54:53 +0100 Subject: [PATCH] RBAC: hide the empty basic role from the org role picker (#72276) hide the empty basic role from the org role picker --- public/app/features/admin/OrgRolePicker.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/public/app/features/admin/OrgRolePicker.tsx b/public/app/features/admin/OrgRolePicker.tsx index bfc0752bdd1..65f55db0f1f 100644 --- a/public/app/features/admin/OrgRolePicker.tsx +++ b/public/app/features/admin/OrgRolePicker.tsx @@ -13,7 +13,8 @@ interface Props { width?: number | 'auto'; } -const options = Object.keys(OrgRole).map((key) => ({ label: key, value: key })); +const basicRoles = Object.values(OrgRole).filter((r) => r !== OrgRole.None); +const options = basicRoles.map((r) => ({ label: r, value: r })); export function OrgRolePicker({ value, onChange, 'aria-label': ariaLabel, inputId, autoFocus, ...restProps }: Props) { return (