[
https://issues.apache.org/jira/browse/OAK-12190?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18081100#comment-18081100
]
Julian Reschke commented on OAK-12190:
--------------------------------------
"Oak API", not FileVault, I assume.
Here's a question: how does FileVault do this if not using an existing API?
> Add createUserWithAbsolutePath and createGroupWithAbsolutePath to UserManager
> API
> ---------------------------------------------------------------------------------
>
> Key: OAK-12190
> URL: https://issues.apache.org/jira/browse/OAK-12190
> Project: Jackrabbit Oak
> Issue Type: Improvement
> Components: security-spi
> Reporter: Nicola Scendoni
> Priority: Major
>
> *Description:*
> The existing {{UserManager.createUser(String, String, Principal, String)}}
> and {{createGroup(String, Principal, String)}} methods accept an
> {{intermediatePath}} parameter that is a relative hint. Implementations may
> resolve this hint differently (e.g., auto-generating hashed sub-paths),
> making it impossible to guarantee the exact JCR location of the new
> authorizable node.
> This ticket adds two new default methods to the UserManager interface that
> accept an absolute Oak repository path, giving callers precise control over
> where the user or group node is created:
> - {{createUserWithAbsolutePath(String userID, String password, Principal
> principal, String absoluteOakPath)}}
> - {{createGroupWithAbsolutePath(String groupID, Principal principal, String
> oakPath)}}
> Both methods are defined as default on the interface, throwing
> {{UnsupportedRepositoryOperationException}} to preserve backward
> compatibility with existing implementations.
> *Changes:*
> - {{oak-jackrabbit-api}} — Added the two new default methods to
> {{{}UserManager{}}}; bumped package version from {{2.4.5}} to {{2.5.0}}
> - {{oak-core}} — Implemented both methods in {{{}UserManagerImpl{}}},
> reusing the existing {{userProvider.createUser/createGroup}} with the
> supplied absolute path
> - {{oak-jcr}} — Added delegation in {{UserManagerDelegator}} wrapping
> results in UserDelegator/GroupDelegator
> - Tests — Added integration tests in {{IntermediatePathTest}} (path
> correctness, wrong root, duplicate ID) and unit tests in
> UserManagerDelegatorTest
--
This message was sent by Atlassian Jira
(v8.20.10#820010)