Netcentric / accesscontroltool

Rights and roles management for AEM made easy
Eclipse Public License 1.0
150 stars 92 forks source link

Use ResourceChangeListeners #621

Closed joerghoh closed 2 years ago

joerghoh commented 2 years ago

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

ghenzler commented 2 years ago

@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

royteeuwen commented 2 years ago

@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

ghenzler commented 2 years ago

@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.