import { ICassandraAccessDef , IKeyspace , } from '@/services/datastores/cassandra/typings/cassandra' ; import { EntityType } from '@/typings/enums' ; import { IClusterDefinition } from '@/typings/typings' ; import { filterAccessibleEntities } from '@/utils/acl-utils' ; import { isClusterShared } from '@/utils/app-utils' ; import { IRequestUserInfo } from '@sharedtypes/express' ; param user param cluster param allKeyspaces returns export async function getCassandraAccess ( user , cluster , allKeyspaces ) { const userKeyspaces = await filterAccessibleEntities ( user , cluster , EntityType . KEYSPACE , allKeyspaces . map ( ( keyspace ) => keyspace . name ) ) ; return { isShared : isClusterShared ( cluster . name ) , userKeyspaceNames : userKeyspaces , } ; }