convertFeaturesToLegacyCapabilities

Function

Site capabilities are currently saved as an array on the site.data.values.capabilities. We want to migragte these legacy capabilities over to features in the new permissions system; however, we must continue persisting updates to these features in the legacy capabilities array until the existing site capabilities in our application are plumbed to work off of permissions

This function is called within updateSite to ensure the legacy capabilities array is kept up-to-date

TODO: Remove once site capabilities use permissions

Site capabilities are currently saved as an array on the site.data.values.capabilities. We want to migragte these legacy capabilities over to features in the new permissions system; however, we must continue persisting updates to these features in the legacy capabilities array until the existing site capabilities in our application are plumbed to work off of permissions

This function is called within updateSite to ensure the legacy capabilities array is kept up-to-date

TODO: Remove once site capabilities use permissions

  • convertFeaturesToLegacyCapabilities(modelToUpdate: IModel, currentModel: IModel) : IModel

Parameters

Parameter Type Default Notes
modelToUpdate Required IModel
currentModel Required IModel

Returns

Property Type Notes
item IItem
data Optional [key: string]: any
resources Optional [key: string]: any

Function defined in common/src/sites/_internal/capabilities/convertFeaturesToLegacyCapabilities.ts:28