Package org.geoserver.security

Examples of org.geoserver.security.GeoServerUserGroupService.canCreateStore()


    protected static GeoServerUserGroupService createH2UserGroupService(String serviceName,
        GeoServerSecurityManager securityManager) throws Exception {       

        if (securityManager.listUserGroupServices().contains(serviceName)) {
            GeoServerUserGroupService service = securityManager.loadUserGroupService(serviceName);
            if (service.canCreateStore()) {
                GeoServerUserGroupStore store = service.createStore();
                store.clear();
                store.store();
            }
            SecurityUserGroupServiceConfig old =
View Full Code Here


        boolean canCreateStore=false;
        SecurityUserGroupServiceConfig config = model.getObject();
        try {
            GeoServerUserGroupService s =
                (GeoServerUserGroupService) Class.forName(config.getClassName()).newInstance();
            canCreateStore=s.canCreateStore();
        } catch (Exception e) {
            // do nothing
        }

       
View Full Code Here

    @Override
    public void doSave(T config) throws Exception {
        getSecurityManager().saveUserGroupService(config);
        if (recodeCheckBox.getModelObject()) {
            GeoServerUserGroupService s = getSecurityManager().loadUserGroupService(config.getName());
            if (s.canCreateStore()) {
                Util.recodePasswords(s.createStore());
            }
        }
    }
View Full Code Here

        throws IOException,PasswordPolicyException {
       
        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>();
View Full Code Here

        this.ugServiceName=ugServiceName;

        GeoServerUserGroupService ugService = getUserGroupService(ugServiceName);
        boolean emptyPasswd = getSecurityManager().loadPasswordEncoder(ugService.getPasswordEncoderName())
            instanceof GeoServerEmptyPasswordEncoder;
        boolean hasUserGroupStore = ugService.canCreateStore();
        boolean hasRoleStore = hasRoleStore(getSecurityManager().getActiveRoleService().getName());

        // build the form
        Form form = new Form<Serializable>("form", new CompoundPropertyModel(user));
        add(form);
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.