Fork me on GitHub

Privileges

Packages can register custom JCR privileges during import by carrying a META-INF/vault/privileges.xml file.

Its DTD is defined as

<!DOCTYPE privileges [
<!ELEMENT privileges (privilege)+>
<!ELEMENT privilege (contains)+>
<!ATTLIST privilege abstract (true|false) false>
<!ATTLIST privilege name NMTOKEN #REQUIRED>
<!ELEMENT contains EMPTY>
<!ATTLIST contains name NMTOKEN #REQUIRED>
]>

The implementation is leveraging the Jackrabbit API PrivilegeManager.

The privilege name must be given in qualified form. Every element may carry XML namespace declarations which are automatically registered in the destination repository during import as well. This should be used when the privilege is using a custom namespace URL.

Aggregate privileges can be registered with the additional element contains which should reference an existing privilege name.