import { AirGappedRestriction } from '@rocket.chat/license'; import { applyAirGappedRestrictionsValidation } from '../../../server/lib/cloud/license/airGappedRestrictionsWrapper'; applyAirGappedRestrictionsValidation.patch(async (_: any, fn: () => Promise): Promise => { if (AirGappedRestriction.restricted) { throw new Error('restricted-workspace'); } return fn(); });