The Teaser component includes the Image dialog tab and uses com.adobe.cq.wcm.core.components.internal.servlets.ImageDelegatePolicyServlet to use the design policy for the Image component when rendering the tab on the dialog. This works for most cases, such as show/hide of the "Disable lazy loading" field with granite:hide="${cqDesign.disableLazyLoading}" based on the Image policy. However, the allowUpload property seems to still be driven by a setting on the Teaser component policy, not the Image component policy.
To reproduce:
Deploy a new AEM project using the archetype - this will create a default image policy with allowUpload="false"
Add an image component to the page - see that upload is disallowed
Add a teaser component to the page - see that upload is allowed
I can verify the teaser policy is used for allowUpload b/c if I manually add allowUpload=false to the teaser policy then uploading an asset on my teaser is disallowed.
This is a bit hidden of a bug b/c technically the Image component doesn't have an allowUpload value in the WCM Core design dialog by default - the AEM archetype is just simply adding it to the configured image policy. However, this option is a good option to have, b/c it is often desirable on AEM to disallow uploading assets directly to a component (assets should be in the DAM), and I'm not sure there's any other good way to disable uploading assets other than overwriting the Image component dialog.
Bug present as of version: 2.24.7-SNAPSHOT
The Teaser component includes the Image dialog tab and uses
com.adobe.cq.wcm.core.components.internal.servlets.ImageDelegatePolicyServlet
to use the design policy for the Image component when rendering the tab on the dialog. This works for most cases, such as show/hide of the "Disable lazy loading" field withgranite:hide="${cqDesign.disableLazyLoading}"
based on the Image policy. However, theallowUpload
property seems to still be driven by a setting on the Teaser component policy, not the Image component policy.To reproduce:
allowUpload="false"
I can verify the teaser policy is used for
allowUpload
b/c if I manually addallowUpload=false
to the teaser policy then uploading an asset on my teaser is disallowed.This is a bit hidden of a bug b/c technically the Image component doesn't have an
allowUpload
value in the WCM Core design dialog by default - the AEM archetype is just simply adding it to the configured image policy. However, this option is a good option to have, b/c it is often desirable on AEM to disallow uploading assets directly to a component (assets should be in the DAM), and I'm not sure there's any other good way to disable uploading assets other than overwriting the Image component dialog.