import { Label } from '@grafana/ui'; import { UserRolePicker } from 'app/core/components/RolePicker/UserRolePicker'; import { contextSrv } from 'app/core/core'; import { OrgRolePicker } from 'app/features/admin/OrgRolePicker'; import { AccessControlAction, OrgRole, Role, ServiceAccountDTO } from 'app/types'; interface Props { label: string; serviceAccount: ServiceAccountDTO; onRoleChange: (role: OrgRole) => void; roleOptions: Role[]; } export const ServiceAccountRoleRow = ({ label, serviceAccount, roleOptions, onRoleChange }: Props): JSX.Element => { const inputId = `${label}-input`; const canUpdateRole = contextSrv.hasPermissionInMetadata(AccessControlAction.ServiceAccountsWrite, serviceAccount); return ( {contextSrv.licensedAccessControlEnabled() ? ( ) : ( <> )} ); };