Hi,

On Tue, Dec 8, 2015 at 9:28 AM, Marius Petria <[email protected]> wrote:
> ...2. Development definition of services and their requirements (defined by a 
> developer)
>         - this a a bundle concern and is a definition of services (not of 
> users) and their needs
>         - it does not say how to get there (create user, add acls, …) just 
> what it needs
>         - someServiceName require read on somePath
>         - someServiceName optional write on somePath...

How do you see this working?

One simple scenario that comes to mind is a utility that verifies that
specific permissions are granted:

  final Session s = repository.loginService(...);
  permissionsChecker.forSession(s)
    .require("jcr:all", somePath)
    .require("jcr:read", anotherPath)

The require method throws an Exception if the requested permissions
are not granted.

Using this in a bundle Activator or in a component's activate() method
causes those activations to fail if permissions are missing, with
clear messages in the logs to help fix that.

Would that work for your use cases?

-Bertrand

Reply via email to