Package org.geoserver.security

Examples of org.geoserver.security.GeoServerUserGroupStore.addGroup()


        if (groups != null && !groups.isEmpty()) {
            for (String groupName : groups) {
                GeoServerUserGroup group = ugStore.getGroupByGroupname(groupName);
                if (group == null) {
                    group = ugStore.createGroupObject(groupName, true);
                    ugStore.addGroup(group);
                }
   
                ugStore.associateUserToGroup(user, group);
            }
        }
View Full Code Here


        } catch (IOException ex) {
            try {
                store2.removeGroup(group);
            } catch (IOException ex1) {
                try {
                    store2.addGroup(group);
                } catch (IOException ex2) {
                    fail=false;
                }
            }
        }
View Full Code Here

        };
           
        service2.registerUserGroupLoadedListener(listener);
       
        // modifiy store1
        store1.addGroup(group);
        store1.store();
        assertTrue(service1.getUserGroups().size()==1);
        assertTrue(service1.getGroupCount()==1);
       
     // increment lastmodified adding a second manually, the test is too fast
View Full Code Here

    protected void onFormSubmit(GeoServerUserGroup group) throws IOException {
        GeoServerUserGroupStore store=null;
        try {
            store = new UserGroupStoreValidationWrapper(getUserGroupStore(userGroupServiceName));
            group = store.createGroupObject(group.getGroupname(),group.isEnabled());
            store.addGroup(group);
            store.store();
        } catch (IOException ex) {
            try {
                store.load();
            } catch (IOException ex2) {};
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.