import makeLogins from './makeLogins' ; import { Acl } from './types' ; export default function makeAcl ( json ) { json = json || { } ; const sshLogins = makeLogins ( json . sshLogins ) ; const windowsLogins = json . windowsLogins || [ ] ; const authConnectors = json . authConnectors || defaultAccess ; const trustedClusters = json . trustedClusters || defaultAccess ; const roles = json . roles || defaultAccess ; const sessions = json . sessions || defaultAccess ; const events = json . events || defaultAccess ; const users = json . users || defaultAccess ; const appServers = json . appServers || defaultAccess ; const kubeServers = json . kubeServers || defaultAccess ; const tokens = json . tokens || defaultAccess ; const accessRequests = json . accessRequests || defaultAccess ; const billing = json . billing || defaultAccess ; const dbServers = json . dbServers || defaultAccess ; const desktops = json . desktops || defaultAccess ; return { sshLogins , windowsLogins , authConnectors , trustedClusters , roles , sessions , events , users , appServers , kubeServers , tokens , accessRequests , billing , dbServers , desktops , } ; } export const defaultAccess = { list : false , read : false , edit : false , create : false , remove : false , } ;