@Test public void testIsDeclaredMember() throws Exception { Group g = createGroup(); List<String> memberPaths = createMembers(g, NUM_USERS/2); root.commit(); for (String path : memberPaths) { assertTrue(mp.isDeclaredMember(getTree(g), getTree(path))); } }
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);   }