Examples of loadUserGroupService()


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

            }
        });

        GeoServerSecurityManager secMgr = getSecurityManager();
        GeoServerUserGroupStore ugStore1 = (GeoServerUserGroupStore) secMgr.loadUserGroupService("test1");
        GeoServerUserGroupStore ugStore2 = (GeoServerUserGroupStore) secMgr.loadUserGroupService("test2");

        RoleStoreValidationWrapper store = new RoleStoreValidationWrapper(
            (GeoServerRoleStore)secMgr.loadRoleService("test"), ugStore1, ugStore2);

        GeoServerRole role1 = store.getRoleByName("role1");
View Full Code Here

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

            new UsernamePasswordAuthenticationToken(username,password,l));
    }

    protected void addUser(String username, String password, List<String> groups, List<String> roles) throws Exception {
        GeoServerSecurityManager secMgr = getSecurityManager();
        GeoServerUserGroupService ugService = secMgr.loadUserGroupService("default");

        GeoServerUserGroupStore ugStore = ugService.createStore();
        GeoServerUser user = ugStore.createUserObject(username, password, true);
        ugStore.addUser(user);
View Full Code Here

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

                return secMgr;
            }
        });

        GeoServerSecurityManager secMgr = getSecurityManager();
        GeoServerUserGroupStore ugStore1 = (GeoServerUserGroupStore) secMgr.loadUserGroupService("test1");
        GeoServerUserGroupStore ugStore2 = (GeoServerUserGroupStore) secMgr.loadUserGroupService("test2");

        RoleStoreValidationWrapper store = new RoleStoreValidationWrapper(
            (GeoServerRoleStore)secMgr.loadRoleService("test"), ugStore1, ugStore2);
View Full Code Here

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

            // check for default admin password
            visibility= manager.checkForDefaultAdminPassword();
            Page changeItPage = null;
            String passwordEncoderName=null;
            try {
                GeoServerUserGroupService ugService = manager.loadUserGroupService(XMLUserGroupService.DEFAULT_NAME);               
                if (ugService != null) {
                    passwordEncoderName = ugService.getPasswordEncoderName();
                    GeoServerUser user = ugService.getUserByUsername(ADMIN_USERNAME);
                    if (user != null) {
                        changeItPage = new EditUserPage(ugService.getName(), user);
View Full Code Here

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

        GeoServerSecurityManager secMgr = createNiceMock(GeoServerSecurityManager.class);
        expect(secMgr.listAuthenticationProviders()).andReturn(new TreeSet<String>()).anyTimes();
       
        GeoServerUserGroupService ugService1 = createNiceMock(GeoServerUserGroupService.class);
        expect(ugService1.getName()).andReturn("test1").anyTimes();
        expect(secMgr.loadUserGroupService("test1")).andReturn(ugService1).anyTimes();

        GeoServerUserGroupService ugService2 = createNiceMock(GeoServerUserGroupService.class);
        expect(ugService2.getName()).andReturn("test2").anyTimes();
        expect(ugService2.getGroupCount()).andReturn(1).anyTimes();
        expect(secMgr.loadUserGroupService("test2")).andReturn(ugService2).anyTimes();
View Full Code Here

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

        expect(secMgr.loadUserGroupService("test1")).andReturn(ugService1).anyTimes();

        GeoServerUserGroupService ugService2 = createNiceMock(GeoServerUserGroupService.class);
        expect(ugService2.getName()).andReturn("test2").anyTimes();
        expect(ugService2.getGroupCount()).andReturn(1).anyTimes();
        expect(secMgr.loadUserGroupService("test2")).andReturn(ugService2).anyTimes();

        GeoServerUserGroupService ugServiceModify = createNiceMock(GeoServerUserGroupService.class);
        expect(ugServiceModify.getName()).andReturn("testModify").anyTimes();
        expect(secMgr.loadUserGroupService("testModify")).andReturn(ugService2).anyTimes();
       
View Full Code Here

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

        expect(ugService2.getGroupCount()).andReturn(1).anyTimes();
        expect(secMgr.loadUserGroupService("test2")).andReturn(ugService2).anyTimes();

        GeoServerUserGroupService ugServiceModify = createNiceMock(GeoServerUserGroupService.class);
        expect(ugServiceModify.getName()).andReturn("testModify").anyTimes();
        expect(secMgr.loadUserGroupService("testModify")).andReturn(ugService2).anyTimes();
       
        expect(secMgr.listUserGroupServices()).andReturn(new TreeSet<String>(
                Arrays.asList("test1", "test2", "testModify"))).anyTimes();

        expect(secMgr.loadPasswordEncoder(getPlainTextPasswordEncoder().getName()))
View Full Code Here

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

        List<GeoServerUserGroup> groups;

        public SelectedGroupsModel(String ugServiceName, GeoServerUser user) {
            try {
                GeoServerSecurityManager secMgr = GeoServerApplication.get().getSecurityManager();
                setObject(new ArrayList(secMgr.loadUserGroupService(ugServiceName).getGroupsForUser(user)));
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
View Full Code Here

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

    @Override
    protected List<GeoServerUserGroup> load() {
        GeoServerSecurityManager secMgr = GeoServerApplication.get().getSecurityManager();
        try {
            return new ArrayList(secMgr.loadUserGroupService(userGroupServiceName).getUserGroups());
        }
        catch(IOException e) {
            throw new WicketRuntimeException(e);
        }
    }
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.