@Test public void testIsDeclaredMemberMissingMembersProperty() throws Exception { Tree grTree = getTree(createGroup()); Tree memberTree = getTree(createUser()); Tree memberList = TreeUtil.addChild(grTree, REP_MEMBERS_LIST, NT_REP_MEMBER_REFERENCES_LIST); TreeUtil.addChild(memberList, "member1", NT_REP_MEMBER_REFERENCES).setProperty(REP_MEMBERS, Collections.singleton(getContentID(memberTree)), Type.STRINGS); assertTrue(mp.isDeclaredMember(grTree, memberTree)); }
boolean isDeclaredMember(@NotNull Tree groupTree, @NotNull Tree authorizableTree) { if (!hasMembers(groupTree)) { return false; } String contentId = getContentID(authorizableTree); MemberReferenceIterator refs = getDeclaredMemberReferenceIterator(groupTree); return Iterators.contains(refs, contentId); }
MembershipProvider extends AuthorizableBaseProvider { boolean isDeclaredMember(@NotNull Tree groupTree, @NotNull Tree authorizableTree) { if (!hasMembers(groupTree)) { return false; } String contentId = getContentID(authorizableTree); MemberReferenceIterator refs = getDeclaredMemberReferenceIterator(groupTree); return Iterators.contains(refs, contentId); } }
MembershipProvider extends AuthorizableBaseProvider { boolean isDeclaredMember(@NotNull Tree groupTree, @NotNull Tree authorizableTree) { if (!hasMembers(groupTree)) { return false; } String contentId = getContentID(authorizableTree); MemberReferenceIterator refs = getDeclaredMemberReferenceIterator(groupTree); return Iterators.contains(refs, contentId); } MembershipProvider(@NotNull Root root, @NotNull ConfigurationParameters config); }
MembershipProvider extends AuthorizableBaseProvider { boolean isDeclaredMember(@NotNull Tree groupTree, @NotNull Tree authorizableTree) { if (!hasMembers(groupTree)) { return false; } String contentId = getContentID(authorizableTree); MemberReferenceIterator refs = getDeclaredMemberReferenceIterator(groupTree); return Iterators.contains(refs, contentId); } MembershipProvider(@NotNull Root root, @NotNull ConfigurationParameters config);  }
MembershipProvider extends AuthorizableBaseProvider { boolean isDeclaredMember(@NotNull Tree groupTree, @NotNull Tree authorizableTree) { if (!hasMembers(groupTree)) { return false; } String contentId = getContentID(authorizableTree); MemberReferenceIterator refs = getDeclaredMemberReferenceIterator(groupTree); return Iterators.contains(refs, contentId); } MembershipProvider(@NotNull Root root, @NotNull ConfigurationParameters config);   }