You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "Angela Schreiber (Jira)" <ji...@apache.org> on 2026/05/21 13:11:01 UTC

[jira] [Resolved] (OAK-12190) Add createUserWithAbsolutePath and createGroupWithAbsolutePath to UserManager API

     [ https://issues.apache.org/jira/browse/OAK-12190?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Angela Schreiber resolved OAK-12190.
------------------------------------
    Resolution: Fixed

> 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
>            Assignee: 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)