Things on a content management system
With AEM6.0 comes a small feature, which you should use to reconsider your usage of sessions, especially the use of admin sessions in your OSGI services.
The feature is: “ResourceResolverFactory.getAdministrativeResourceResolver” is going to be deprecated!
Oh wait, that should be a feature, you might ask. Yes, it is. Because it is being replaced by a feature, which allows you to easily replace the sessions, previously owned by the admin (for the sake of laziness of the developer …) by sessions owned by regular users. Users which don’t have the super-power of admin, but regular users, which have to follow the ACLs as any other regular user.
A nice description how it works can be found on the Apache Sling website.
But how do you use it?
First, define what user should be used by your service. Specify this in the form “symbolic-bundle-name:sub service-name=user” in the config of the…
View original post 123 more words