wcm-io / io.wcm.caconfig.editor

Context-Aware Configuration Editor Template for AEM.
Apache License 2.0
3 stars 7 forks source link

Expose write location in repository #25

Closed kwin closed 5 months ago

kwin commented 6 months ago

Currently only the context path is exposed per CAC Editor page Screenshot 2024-03-06 at 20 00 37

Next to it there should be the repository resource path being exposed where newly added properties would be persisted. This helps with figuring out permission issues.

kwin commented 6 months ago

IMHO this can be achieved by leveraging org.apache.sling.caconfig.management.multiplexer.ConfigurationResourceResolvingStrategyMultiplexer with its getResourcePath(Resource contextResource, "sling:configs", <FQCN of annotated configuration annotation>).

kwin commented 6 months ago

This would also be useful to provide a better guidance to users lacking write permission in that location (by e.g. disabling the Save button and make all fields read-only)

stefanseifert commented 6 months ago

provided PR #31: it both adds a (i) button to show the actual persist path, and also renders the config details dialog readonly if the current user does not have write permission to this path.