You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-dev@jackrabbit.apache.org by Marco Piovesana <pi...@esteco.com> on 2016/08/13 11:25:04 UTC

unregister custom privilege

dear all,
I'm working with custom privileges, I did register a custom privilege doing
this:

PrivilegeManager privilegeManager = ((JackrabbitWorkspace)
session.getWorkspace()).getPrivilegeManager();
Privilege privilege =
privilegeManager.registerPrivilege("custom:mycustomprivilege",
false, new String[0]);

How can i delete it? There's an automated way to specify all my custom
privileges (like the file *.config for the custom node types)?

Marco.

Re: unregister custom privilege

Posted by Angela Schreiber <an...@adobe.com>.
Hi Marco

See answers inline below

On 13/08/16 13:25, "Marco Piovesana" <pi...@esteco.com> wrote:

>dear all,
>I'm working with custom privileges, I did register a custom privilege
>doing
>this:
>
>PrivilegeManager privilegeManager = ((JackrabbitWorkspace)
>session.getWorkspace()).getPrivilegeManager();
>Privilege privilege =
>privilegeManager.registerPrivilege("custom:mycustomprivilege",
>false, new String[0]);
>
>How can i delete it?

That's not possible in a regular JCR setup based on Oak.

>There's an automated way to specify all my custom
>privileges (like the file *.config for the custom node types)?

Currently this is only possible by registering them one after the other.
If there is common need for registering multiple privileges at once we
can add API extensions to the PrivilegeManager interface in jackrabbit-api.
But there is no *.config file support for custom node types either...
not sure what you are referring to. Maybe you have to elaborate on this.

Kind regards
Angela

>
>Marco.