Examples of listRoleServices()


Examples of org.geoserver.security.GeoServerSecurityManager.listRoleServices()

        } catch (SecurityConfigException ex) {
            throw new IOException(ex);
        }

        GeoServerSecurityManager secMgr = createNiceMock(GeoServerSecurityManager.class);
        expect(secMgr.listRoleServices()).andReturn(
            new TreeSet<String>(Arrays.asList("default", "jdbc"))).anyTimes();
        replay(secMgr);
        validator = new JdbcSecurityConfigValidator(secMgr);

        JDBCRoleServiceConfig oldConfig = new JDBCRoleServiceConfig(config);
View Full Code Here

Examples of org.geoserver.security.GeoServerSecurityManager.listRoleServices()

            .andReturn(ugConfig).anyTimes();
   
        //default role store
        GeoServerRoleStore roleStore =
            createRoleStore(XMLRoleService.DEFAULT_NAME, secMgr);
        expect(secMgr.listRoleServices()).andReturn(
            new TreeSet<String>(Arrays.asList(XMLRoleService.DEFAULT_NAME))).anyTimes();
        expect(secMgr.getActiveRoleService()).andReturn(roleStore).anyTimes();
   
        //auth providers
        SecurityAuthProviderConfig authProviderConfig = createNiceMock(SecurityAuthProviderConfig.class);
View Full Code Here

Examples of org.geoserver.security.GeoServerSecurityManager.listRoleServices()

                GeoServerRoleStore roleStore1 = createRoleStore("test", secMgr, "role1", "parent1");
                addRolesToCreate(roleStore1, "", "duplicated", "xxx");

                GeoServerRoleStore roleStore2 = createRoleStore("test1", secMgr, "duplicated");
               
                expect(secMgr.listRoleServices()).andReturn(
                    new TreeSet<String>(Arrays.asList("test", "test1"))).anyTimes();

                replay(roleStore1, roleStore2, secMgr);
                return secMgr;
            }
View Full Code Here

Examples of org.geoserver.security.GeoServerSecurityManager.listRoleServices()

        GeoServerRoleService activeRoleService = createNiceMock(GeoServerRoleService.class);
        expect(activeRoleService.getName()).andReturn("foo").anyTimes();
        expect(secMgr.getActiveRoleService()).andReturn(activeRoleService).anyTimes();
       
        expect(secMgr.listRoleServices()).andReturn(new TreeSet<String>(
            Arrays.asList("test1", "test2", "test3", "test4"))).anyTimes();
       
        replay(roleService1, roleService2, roleService3, roleService4, activeRoleService, secMgr);

        validator = new XMLSecurityConfigValidator(secMgr);
View Full Code Here

Examples of org.geoserver.security.GeoServerSecurityManager.listRoleServices()

    @Override
    protected List<SecurityRoleServiceConfig> load() {
        GeoServerSecurityManager secMgr = GeoServerApplication.get().getSecurityManager();
        List<SecurityRoleServiceConfig> configs = new ArrayList();
        try {
            for (String roleServiceName : secMgr.listRoleServices()) {
                SecurityRoleServiceConfig config = secMgr.loadRoleServiceConfig(roleServiceName);
                configs.add(config);
            }
        } catch (IOException e) {
            throw new RuntimeException(e);
View Full Code Here

Examples of org.geoserver.security.GeoServerSecurityManager.listRoleServices()

        gaStore=null;
    }

    protected void deactivateRORoleService() throws Exception {
        GeoServerSecurityManager secMgr = getSecurityManager();
        if (secMgr.listRoleServices().contains(getRORoleServiceName())) {
            SecurityRoleServiceConfig config =
                secMgr.loadRoleServiceConfig((getRORoleServiceName()));
            secMgr.removeRoleService(config);
        }
    }
View Full Code Here

Examples of org.geoserver.security.GeoServerSecurityManager.listRoleServices()

    }

    @Before
    public void removeRoleService2() throws Exception {
        GeoServerSecurityManager secMgr = getSecurityManager();
        if (secMgr.listRoleServices().contains("default2")) {
            SecurityRoleServiceConfig roleService = secMgr.loadRoleServiceConfig("default2");
            secMgr.removeRoleService(roleService);
        }
    }
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.