Package org.geoserver.security

Examples of org.geoserver.security.SecureCatalogImpl.list()


                sc.getCoverages(),
                sc.list(CoverageInfo.class, Predicates.acceptAll()),
                equalTo(coverages));
        assertThatBoth(
                sc.getWorkspaces(),
                sc.list(WorkspaceInfo.class, Predicates.acceptAll()),
                equalTo(workspaces));
    }

    @Test
    public void testPublicRead() throws Exception {
View Full Code Here


        assertNotNull(sc.getFeatureTypeByName("topp:states"));
        assertTrue(sc.getFeatureTypeByName("topp:states") instanceof SecuredFeatureTypeInfo);
        assertTrue(sc.getResourceByName("topp:states", FeatureTypeInfo.class) instanceof SecuredFeatureTypeInfo);
       
        assertThatBoth(sc.getFeatureTypes(),
              sc.list(FeatureTypeInfo.class, Predicates.acceptAll()),
              allOf((Matcher)hasSize(featureTypes.size()),
                (Matcher)everyItem(Matchers.<FeatureTypeInfo>instanceOf(SecuredFeatureTypeInfo.class))));
        assertThatBoth(sc.getCoverages(),
              sc.list(CoverageInfo.class, Predicates.acceptAll()),
              equalTo(coverages));
View Full Code Here

        assertThatBoth(sc.getFeatureTypes(),
              sc.list(FeatureTypeInfo.class, Predicates.acceptAll()),
              allOf((Matcher)hasSize(featureTypes.size()),
                (Matcher)everyItem(Matchers.<FeatureTypeInfo>instanceOf(SecuredFeatureTypeInfo.class))));
        assertThatBoth(sc.getCoverages(),
              sc.list(CoverageInfo.class, Predicates.acceptAll()),
              equalTo(coverages));
        assertThatBoth(sc.getWorkspaces(),
              sc.list(WorkspaceInfo.class, Predicates.acceptAll()),
              equalTo(workspaces));
      
View Full Code Here

                (Matcher)everyItem(Matchers.<FeatureTypeInfo>instanceOf(SecuredFeatureTypeInfo.class))));
        assertThatBoth(sc.getCoverages(),
              sc.list(CoverageInfo.class, Predicates.acceptAll()),
              equalTo(coverages));
        assertThatBoth(sc.getWorkspaces(),
              sc.list(WorkspaceInfo.class, Predicates.acceptAll()),
              equalTo(workspaces));
      
        assertNotNull(sc.getLayerByName("topp:states"));
        assertTrue(sc.getLayerByName("topp:states") instanceof SecuredLayerInfo);
        assertTrue(sc.getDataStoreByName("states") instanceof SecuredDataStoreInfo);
View Full Code Here

        };

        // use no user at all
        SecurityContextHolder.getContext().setAuthentication(anonymous);
       
        List<FeatureTypeInfo> ftResult = collectAndClose(sc.list(FeatureTypeInfo.class, Predicates.acceptAll()));
        WorkspaceInfo foo = ftResult.get(0).getStore().getWorkspace();
        assertThat(
                ftResult,
                contains(
                        matchFT("foo", mockWSInfo),
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.