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 (JIRA)" <ji...@apache.org> on 2017/05/02 07:24:04 UTC

[jira] [Commented] (OAK-6141) MembershipWriter setMembers() doesn't properly cleanup tree

    [ https://issues.apache.org/jira/browse/OAK-6141?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15992476#comment-15992476 ] 

angela commented on OAK-6141:
-----------------------------

[~alexparvulescu], the method mentioned is only used for migration from Jackrabbit 2.x to Oak. Therefore the existing code is correct as the {{UserConstants.REP_MEMBERS_LIST}} was only introduced in Oak 1.0. Previously the tree structure started differently as you can see in the node type definition. I would not touch that migration code unless we have a bug in the migration, which IMHO is not the case.

-> would suggest to resolve this not a bug.

> MembershipWriter setMembers() doesn't properly cleanup tree
> -----------------------------------------------------------
>
>                 Key: OAK-6141
>                 URL: https://issues.apache.org/jira/browse/OAK-6141
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: core, security
>            Reporter: Alex Parvulescu
>            Assignee: Alex Parvulescu
>
> I'm pretty sure this [0] is supposed to be instead:
> {noformat}
> group.getChildNode(UserConstants.REP_MEMBERS_LIST).remove();
> {noformat}
>  in its current shape, this will fail to cleanup preexisting members.
> Also, I'd prefer if this would actually: 1. cleanup, 2. call existing #addMembers method to reduce code duplication.
> [~anchela] thoughts?
> [0] https://github.com/apache/jackrabbit-oak/blob/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/MembershipWriter.java#L248



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)