import { I18NContentContext } from "../types" ; import lodashGet from "lodash.get" ; export default async ( context ) : Promise < boolean > => { const contentPermission = await context . security . getPermission ( "content.i18n" ) ; if ( ! contentPermission ) { return false ; } const code = lodashGet ( context , "i18nContent.locale.code" ) ; return ! Array . isArray ( contentPermission . locales ) || contentPermission . locales . includes ( code ) ; } ;