Package org.geoserver.security.validation

Examples of org.geoserver.security.validation.UserGroupStoreValidationWrapper


    @Override
    protected void onFormSubmit(GeoServerUserGroup group) throws IOException {
        GeoServerUserGroupStore store = null;
        try {
            if (hasUserGroupStore(userGroupServiceName)) {
                store = new UserGroupStoreValidationWrapper(getUserGroupStore(userGroupServiceName));
                store.updateGroup(group);
                store.store();
            };
        } catch (IOException ex) {
            try {
View Full Code Here


    @Override
    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 {
View Full Code Here

                GeoServerUserGroupStore ugStore=null;
                try {
                    GeoServerUserGroupService ugService =
                            GeoServerApplication.get().getSecurityManager()
                            .loadUserGroupService(userGroupsServiceName);
                    ugStore = new UserGroupStoreValidationWrapper(ugService.createStore());
                    for (GeoServerUserGroup group : removePanel.getRoots()) {                    
                         ugStore.removeGroup(group);
                    }
                    ugStore.store();
                } catch (IOException ex) {
View Full Code Here

       
        GeoServerUserGroupService ugService = getUserGroupService(ugServiceName);
        GeoServerUserGroupStore ugStore = null;
        try {
            if (ugService.canCreateStore()) {
                ugStore = new UserGroupStoreValidationWrapper(ugService.createStore());
   
                Set<GeoServerUserGroup> orig = ugStore.getGroupsForUser(user);
                Set<GeoServerUserGroup> add = new HashSet<GeoServerUserGroup>();
                Set<GeoServerUserGroup> remove = new HashSet<GeoServerUserGroup>();
                userGroupPalette.diff(orig, add, remove);
View Full Code Here

                GeoServerUserGroupStore ugStore = null;
                try {
                    GeoServerUserGroupService ugService = GeoServerApplication.get()
                            .getSecurityManager().loadUserGroupService(userGroupsServiceName);
                    ugStore = new UserGroupStoreValidationWrapper(ugService.createStore());
                    for (GeoServerUser user : removePanel.getRoots()) {                    
                        ugStore.removeUser(user);
                    }
                    ugStore.store();
                } catch (IOException ex) {
View Full Code Here

    }

    @Override
    protected void onFormSubmit(GeoServerUser user) throws IOException,PasswordPolicyException {
        GeoServerUserGroupStore ugStore =
            new UserGroupStoreValidationWrapper(getUserGroupStore(ugServiceName));
        try {
            ugStore.addUser(user);

            for (GeoServerUserGroup group :  userGroupPalette.getSelectedGroups()) {
                ugStore.associateUserToGroup(user, group);
            }
            ugStore.store();

        } catch (IOException ex) {
            try {ugStore.load(); } catch (IOException ex2) {};
            throw ex;
        } catch (PasswordPolicyException ex) {          
            try {ugStore.load(); } catch (IOException ex2) {};
            throw ex;
        }

        GeoServerRoleStore gaStore = null;
        try {
View Full Code Here

TOP

Related Classes of org.geoserver.security.validation.UserGroupStoreValidationWrapper

Copyright © 2018 www.massapicom. 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.