import { KibanaRequest } from 'kibana/server' ; import { APMPluginStartDependencies } from '../../types' ; export function isSuperuser ( { securityPluginStart , request , } ) { const user = securityPluginStart . authc . getCurrentUser ( request ) ; return user ?. roles . includes ( 'superuser' ) ; }