* use role groups in role picker UI
* Update public/app/core/components/RolePicker/RolePickerMenu.tsx
Co-authored-by: kay delaney <45561153+kaydelaney@users.noreply.github.com>
Co-authored-by: kay delaney <45561153+kaydelaney@users.noreply.github.com>
(cherry picked from commit 11f133b406)
Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
This commit is contained in:
co-authored by
Ieva
parent
8cfc96fa61
commit
ed00b3cf50
@@ -498,8 +498,7 @@ export const RoleMenuGroupOption = React.forwardRef<HTMLDivElement, RoleMenuGrou
|
||||
RoleMenuGroupOption.displayName = 'RoleMenuGroupOption';
|
||||
|
||||
const getRoleGroup = (role: Role) => {
|
||||
const parts = role.name.split(':');
|
||||
return parts.length > 1 ? parts[1] : '';
|
||||
return role.group ?? 'Other';
|
||||
};
|
||||
|
||||
const capitalize = (s: string): string => {
|
||||
|
||||
@@ -55,6 +55,7 @@ export interface Role {
|
||||
name: string;
|
||||
displayName: string;
|
||||
description: string;
|
||||
group: string;
|
||||
global: boolean;
|
||||
version: number;
|
||||
created: string;
|
||||
|
||||
Reference in New Issue
Block a user