accesscontroltool icon indicating copy to clipboard operation
accesscontroltool copied to clipboard

Use ResourceChangeListeners

Open joerghoh opened this issue 3 years ago • 3 comments

I found that biz.netcentric.cq.tools.actool.configuploadlistener.impl.UploadListenerServiceImpl$AcToolConfigUpdateListener is registered to listen for OSGI Resource Events.

This approach is deprecated by now, instead you should use the ResourceChangeListener approach, as indicated in the Sling documentation

joerghoh avatar Dec 14 '21 17:12 joerghoh

@joerghoh we don't really recommend to use it (see https://github.com/Netcentric/accesscontroltool/blob/develop/docs/ApplyConfig.md#upload-listener-service, it's more there for historical reasons), but yes, it should be upgraded to use the ResourceChangeListener approach

ghenzler avatar Jan 14 '22 16:01 ghenzler

@ghenzler It would be nice because the install hook way for local development polutes the configuration for the cloud deployment, forcing it to be put on mixed instead of container

royteeuwen avatar Jan 17 '22 10:01 royteeuwen

@royteeuwen The upload listener would not allow to restrict/allow access to product functionality in /libs and /apps, using a separate package for all yaml files with type mixed ala https://github.com/Netcentric/accesscontroltool/blob/develop/docs/Installation.md#declaring-the-dependency is a good compromise from our experience.

ghenzler avatar Jan 19 '22 15:01 ghenzler