mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Access Control: use role groups in role picker (#41912)
* 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>
This commit is contained in:
parent
da5327ea14
commit
11f133b406
@ -498,8 +498,7 @@ export const RoleMenuGroupOption = React.forwardRef<HTMLDivElement, RoleMenuGrou
|
|||||||
RoleMenuGroupOption.displayName = 'RoleMenuGroupOption';
|
RoleMenuGroupOption.displayName = 'RoleMenuGroupOption';
|
||||||
|
|
||||||
const getRoleGroup = (role: Role) => {
|
const getRoleGroup = (role: Role) => {
|
||||||
const parts = role.name.split(':');
|
return role.group ?? 'Other';
|
||||||
return parts.length > 1 ? parts[1] : '';
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const capitalize = (s: string): string => {
|
const capitalize = (s: string): string => {
|
||||||
|
@ -55,6 +55,7 @@ export interface Role {
|
|||||||
name: string;
|
name: string;
|
||||||
displayName: string;
|
displayName: string;
|
||||||
description: string;
|
description: string;
|
||||||
|
group: string;
|
||||||
global: boolean;
|
global: boolean;
|
||||||
version: number;
|
version: number;
|
||||||
created: string;
|
created: string;
|
||||||
|
Loading…
Reference in New Issue
Block a user