Package org.geoserver.security

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


        fail=true;
        try {
            store2.clear();
        } catch (IOException ex) {
            try {
                store2.store();
            } catch (IOException e) {
                fail=false;
            }
        }
        if (fail)
View Full Code Here


            CheckRoleLoaded listener = new CheckRoleLoaded();
            service2.registerRoleLoadedListener(listener);
           
            // modifiy store1
            store1.addRole(role_test1);
            store1.store();
            assertTrue(service1.getRoles().size()==1);
           
            // increment lastmodified adding a second manually, the test is too fast
            xmlFile.setLastModified(xmlFile.lastModified()+1000);
           
View Full Code Here

                gaStore = new RoleStoreValidationWrapper(gaStore);

                for (GeoServerRole role : rolePalette.getSelectedRoles()) {
                    gaStore.associateRoleToGroup(role, group.getGroupname());
                }
                gaStore.store();
            }
        } catch (IOException ex) {
            try {gaStore.load(); } catch (IOException ex2) {};
            throw ex;
        }
View Full Code Here

                                 List<GeoServerRole> list= new ArrayList<GeoServerRole>();
                                 list.addAll(gaStore.getRolesForGroup(group.getGroupname()));
                                 for (GeoServerRole role: list)
                                     gaStore.disAssociateRoleFromGroup(role, group.getGroupname());
                        }
                        gaStore.store();
                    } catch (IOException ex) {
                        try {gaStore.load(); } catch (IOException ex2) {};
                        throw new RuntimeException(ex);
                    }
                }
View Full Code Here

                    roleStore.associateRoleToUser(role, user.getUsername());
                }
                for (GeoServerRole role : remove) {
                    roleStore.disAssociateRoleFromUser(role, user.getUsername());
                }
                roleStore.store();
            }
        } catch (IOException ex) {
            try { roleStore.load(); } catch (IOException ex2) {};
            throw ex;
        }
View Full Code Here

            if (parentRoleName != null) {
                GeoServerRole parentRole = store.getRoleByName(parentRoleName);
                store.setParentRole(role, parentRole);
            }

            store.store();
        } catch (IOException ex) {
            try {store.load(); } catch (IOException ex2) {};
            throw ex;
        }
    }
View Full Code Here

                                list.addAll(gaStore.getRolesForUser(user.getUsername()));
                                for (GeoServerRole role: list)
                                    gaStore.disAssociateRoleFromUser(role, user.getUsername());
                           
                        }
                        gaStore.store();       
                    } catch (IOException ex) {
                        try {gaStore.load(); } catch (IOException ex2) {};
                        throw new RuntimeException(ex);
                    }
                }
View Full Code Here

                gaStore = getRoleStore(getSecurityManager().getActiveRoleService().getName());
                gaStore = new RoleStoreValidationWrapper(gaStore);
                for (GeoServerRole role : rolePalette.getSelectedRoles()) {
                    gaStore.associateRoleToUser(role, user.getUsername());
                }
                gaStore.store();
            }
        } catch (IOException ex) {
            try {gaStore.load(); } catch (IOException ex2) {};
            throw ex;
        }
View Full Code Here

            if (parentRoleName != null) {
                GeoServerRole parentRole = store.getRoleByName(parentRoleName);
                store.setParentRole(role, parentRole);
            }

            store.store();
        } catch (IOException ex) {
            try {store.load(); } catch (IOException ex2) {};
            throw ex;
        }
    }
View Full Code Here

        roleStore.addRole(role);
        roleStore.associateRoleToUser(role, "cite");
        roleStore.associateRoleToUser(role, "cite_nomosaic");
        roleStore.associateRoleToUser(role, "cite_cropmosaic")
        roleStore.associateRoleToUser(role, "cite_filtermosaic");            
        roleStore.store();
       
        // populate the access manager
        Catalog catalog = getCatalog();
        TestResourceAccessManager tam = (TestResourceAccessManager) applicationContext
                .getBean("testResourceAccessManager");
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.