import { merge } from 'lodash' ; import { Permission } from '@directus/shared/types' ; import { requireYAML } from '../../../utils/require-yaml' ; const defaults = { role : null , permissions : { } , validation : null , presets : null , fields : [ '*' ] , system : true , } ; const schemaPermissionsRaw = requireYAML ( require . resolve ( './schema-access-permissions.yaml' ) ) as Permission [ ] ; const permissions = requireYAML ( require . resolve ( './app-access-permissions.yaml' ) ) as Permission [ ] ; export const schemaPermissions = schemaPermissionsRaw . map ( ( row ) => merge ( { } , defaults , row ) ) ; export const appAccessMinimalPermissions = [ ... schemaPermissions , ... permissions ] . map ( ( row ) => merge ( { } , defaults , row ) ) ;