RBAC: Allow the basic role None as option of the org role selector (#76335)

This commit is contained in:
Mattia Buccarella 2023-10-12 12:46:57 +02:00 committed by GitHub
parent 790f878eca
commit 43928d38af
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -13,8 +13,7 @@ interface Props {
width?: number | 'auto';
}
const basicRoles = Object.values(OrgRole).filter((r) => r !== OrgRole.None);
const options = basicRoles.map((r) => ({ label: r, value: r }));
const options = Object.keys(OrgRole).map((key) => ({ label: key, value: key }));
export function OrgRolePicker({ value, onChange, 'aria-label': ariaLabel, inputId, autoFocus, ...restProps }: Props) {
return (