Package org.geoserver.security

Examples of org.geoserver.security.GeoServerRoleStore.removeRole()


            @Override
            public GeoServerSecurityManager createSecurityManager( MockTestData testData) throws Exception {
                GeoServerSecurityManager secMgr = createNiceMock(GeoServerSecurityManager.class);

                GeoServerRoleStore roleStore = createRoleStore("test", secMgr, "role1", "parent1");
                expect(roleStore.removeRole(new GeoServerRole("unused"))).andReturn(true);

                DataAccessRule dataAccessRule = createNiceMock(DataAccessRule.class);
                expect(dataAccessRule.compareTo(dataAccessRule)).andReturn(0).anyTimes();
                expect(dataAccessRule.getKey()).andReturn("foo").anyTimes();
                expect(dataAccessRule.getRoles()).andReturn(new TreeSet<String>(Arrays.asList("role1"))).anyTimes();
View Full Code Here


                try {
                    GeoServerRoleService gaService =
                            GeoServerApplication.get().getSecurityManager().loadRoleService(roleServiceName);
                    gaStore = new RoleStoreValidationWrapper(gaService.createStore());
                    for (GeoServerRole role : removePanel.getRoots()) {                    
                         gaStore.removeRole(role);
                    }
                    gaStore.store();
                } catch (IOException ex) {
                    try {gaStore.load(); } catch (IOException ex2) {};
                    throw new RuntimeException(ex);
View Full Code Here

        fail=true;
        try {
            store2.updateRole(role_test2);
        } catch (IOException ex) {
            try {
                store2.removeRole(role_test2);
            } catch (IOException ex1) {
                try {
                    store2.addRole(role_test2);
                } catch (IOException ex2) {
                    fail=false;
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.