@Test void testCanWrite6() { final WebAcService testService2 = new WebAcService(mockResourceService, new WebAcService.NoopAuthorizationCache(), false, WebAcService.DEFAULT_ACL_LOCATION); when(mockSession.getAgent()).thenReturn(agentIRI); when(mockParentResource.getInteractionModel()).thenReturn(LDP.DirectContainer); when(mockParentResource.getMembershipResource()).thenReturn(of(memberIRI)); assertAll("Check writability for " + agentIRI, () -> assertTrue(testService2.getAccessModes(memberIRI, mockSession).contains(ACL.Write), "Cannot write to " + memberIRI), () -> assertTrue(testService2.getAccessModes(nonexistentIRI, mockSession).contains(ACL.Write), "Cannot write to " + nonexistentIRI), () -> assertTrue(testService2.getAccessModes(resourceIRI, mockSession).contains(ACL.Write), "Cannot write to " + resourceIRI), () -> assertTrue(testService2.getAccessModes(childIRI, mockSession).contains(ACL.Write), "Cannot write to " + childIRI), () -> assertTrue(testService2.getAccessModes(parentIRI, mockSession).contains(ACL.Write), "Cannot write to " + parentIRI), () -> assertTrue(testService2.getAccessModes(rootIRI, mockSession).contains(ACL.Write), "Cannot write to " + rootIRI)); }
public Set<IRI> getAccessModes(final IRI identifier, final Session session) { return getAuthorizedModes(identifier, session).getAccessModes(); }
WebAcService { public Set<IRI> getAccessModes(final IRI identifier, final Session session) { return getAuthorizedModes(identifier, session).getAccessModes(); } }
WebAcService { public Set<IRI> getAccessModes(final IRI identifier, final Session session) { return getAuthorizedModes(identifier, session).getAccessModes(); } WebAcService(); @Inject  WebAcService(final ResourceService resourceService,
            @TrellisAuthorizationCache final CacheService<String, AuthorizedModes> cache); private  WebAcService(final ResourceService resourceService, final CacheService<String, AuthorizedModes> cache,
            final Config config);  WebAcService(final ResourceService resourceService, final CacheService<String, AuthorizedModes> cache,
            final boolean checkMembershipResources, final String defaultAuthResourceLocation); }
WebAcService { public Set<IRI> getAccessModes(final IRI identifier, final Session session) { return getAuthorizedModes(identifier, session).getAccessModes(); } WebAcService(); @Inject  WebAcService(final ResourceService resourceService,
            @TrellisAuthorizationCache final CacheService<String, AuthorizedModes> cache); private  WebAcService(final ResourceService resourceService, final CacheService<String, AuthorizedModes> cache,
            final Config config);  WebAcService(final ResourceService resourceService, final CacheService<String, AuthorizedModes> cache,
            final boolean checkMembershipResources, final String defaultAuthResourceLocation); @PostConstruct void initialize(); Set<IRI> getAccessModes(final IRI identifier, final Session session); AuthorizedModes getAuthorizedModes(final IRI identifier, final Session session); static String generateCacheKey(final IRI identifier, final IRI agent); }
WebAcService { public Set<IRI> getAccessModes(final IRI identifier, final Session session) { return getAuthorizedModes(identifier, session).getAccessModes(); } WebAcService(); @Inject  WebAcService(final ResourceService resourceService,
            @TrellisAuthorizationCache final CacheService<String, AuthorizedModes> cache); private  WebAcService(final ResourceService resourceService, final CacheService<String, AuthorizedModes> cache,
            final Config config);  WebAcService(final ResourceService resourceService, final CacheService<String, AuthorizedModes> cache,
            final boolean checkMembershipResources, final String defaultAuthResourceLocation); @PostConstruct void initialize(); Set<IRI> getAccessModes(final IRI identifier, final Session session); AuthorizedModes getAuthorizedModes(final IRI identifier, final Session session); static String generateCacheKey(final IRI identifier, final IRI agent); static final String CONFIG_WEBAC_MEMBERSHIP_CHECK; static final String CONFIG_WEBAC_DEFAULT_ACL_LOCATION; static final String CONFIG_WEBAC_INITIALIZE_ROOT_ACL; static final String DEFAULT_ACL_LOCATION; }