Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Invalid
-
2.12.1
-
None
-
None
Description
Most methods in AccessControlUtils - while taking the principal name as argument - always fetch the principal via the jackrabbit PrincipalManager.
This (at least in Oak) requires the user to have read access on the user behind the principal, otherwise it returns null and an NPE is thrown and no ACs are set.
Setting an AC however does not (and should not) require access to the complete user, and can be done by implementing the principal on the spot:
new JackrabbitPrincipal() { @Override public String getName() { return principalName; } };
This uses the JackrabbitPrincipal as the PrincipalImpl in Oak casts to this one for the equality test.
Filevault does the same.