Examples of storeRules()


Examples of org.geoserver.security.DataAccessRuleDAO.storeRules()

            private void onFormSubmit() {
                try {
                    DataAccessRuleDAO dao = DataAccessRuleDAO.get();
                    CatalogMode newMode = dao.getByAlias(catalogMode.getValue());
                    dao.setCatalogMode(newMode);
                    dao.storeRules();
                    setResponsePage(CatalogModePage.class);
                } catch (Exception e) {
                    LOGGER.log(Level.SEVERE, "Error occurred while saving user", e);
                    error(new ParamResourceModel("saveError", getPage(), e.getMessage()));
                }
View Full Code Here

Examples of org.geoserver.security.DataAccessRuleDAO.storeRules()

            DataAccessRule rule = new DataAccessRule((String) workspace.getConvertedInput(),
                    (String) layer.getConvertedInput(),
                    (AccessMode) accessMode.getConvertedInput(), roles);
            DataAccessRuleDAO dao = DataAccessRuleDAO.get();
            dao.addRule(rule);
            dao.storeRules();
            setResponsePage(DataAccessRulePage.class);
        } catch (Exception e) {
            LOGGER.log(Level.SEVERE, "Error occurred while saving user", e);
            error(new ParamResourceModel("saveError", getPage(), e.getMessage()));
        }
View Full Code Here

Examples of org.geoserver.security.DataAccessRuleDAO.storeRules()

                DataAccessRuleDAO dao = DataAccessRuleDAO.get();
                for (DataAccessRule rule : selection) {
                    dao.removeRule(rule);  
                }
                try {
                    dao.storeRules();
                } catch (IOException e) {
                    e.printStackTrace();
                }
               
                // the deletion will have changed what we see in the page
View Full Code Here

Examples of org.geoserver.security.DataAccessRuleDAO.storeRules()

    @Override
    protected void onFormSubmit() {
        try {
            DataAccessRuleDAO dao = DataAccessRuleDAO.get();
            dao.addRule((DataAccessRule) getModelObject());
            dao.storeRules();
            setResponsePage(DataAccessRulePage.class);
        } catch (Exception e) {
            LOGGER.log(Level.SEVERE, "Error occurred while saving user", e);
            error(new ParamResourceModel("saveError", getPage(), e.getMessage()));
        }
View Full Code Here

Examples of org.geoserver.security.ServiceAccessRuleDAO.storeRules()

      ServiceAccessRule rule = new ServiceAccessRule((String) service
          .getConvertedInput(), (String) method
          .getConvertedInput(), roles);
      ServiceAccessRuleDAO dao = ServiceAccessRuleDAO.get();
      dao.addRule(rule);
      dao.storeRules();
      setResponsePage(ServiceAccessRulePage.class);
    } catch (Exception e) {
      LOGGER.log(Level.SEVERE, "Error occurred while saving user", e);
      error(new ParamResourceModel("saveError", getPage(), e.getMessage()));
    }
View Full Code Here

Examples of org.geoserver.security.ServiceAccessRuleDAO.storeRules()

                ServiceAccessRuleDAO dao = ServiceAccessRuleDAO.get();
                for (ServiceAccessRule service : selection) {
                    dao.removeRule(service);
                }
                try {
                    dao.storeRules();
                } catch (IOException e) {
                    e.printStackTrace();
                }

                // the deletion will have changed what we see in the page
View Full Code Here

Examples of org.geoserver.security.ServiceAccessRuleDAO.storeRules()

    @Override
    protected void onFormSubmit() {
        try {
            ServiceAccessRuleDAO dao = ServiceAccessRuleDAO.get();
            dao.addRule((ServiceAccessRule) getModelObject());
            dao.storeRules();
            setResponsePage(ServiceAccessRulePage.class);
        } catch(Exception e) {
            LOGGER.log(Level.SEVERE, "Error occurred while saving service", e);
            error(new ParamResourceModel("saveError", getPage(), e.getMessage()));
        }
View Full Code Here

Examples of org.geoserver.security.impl.DataAccessRuleDAO.storeRules()

                DataAccessRuleDAO dao = DataAccessRuleDAO.get();
                for (DataAccessRule rule : selection) {
                    dao.removeRule(rule);  
                }
                try {
                    dao.storeRules();
                } catch (IOException e) {
                    e.printStackTrace();
                }
               
                // the deletion will have changed what we see in the page
View Full Code Here

Examples of org.geoserver.security.impl.DataAccessRuleDAO.storeRules()

            private void onFormSubmit() {
                try {
                    DataAccessRuleDAO dao = DataAccessRuleDAO.get();
                    CatalogMode newMode = dao.getByAlias(catalogMode.getValue());
                    dao.setCatalogMode(newMode);
                    dao.storeRules();
                    setResponsePage(CatalogModePage.class);
                } catch (Exception e) {
                    LOGGER.log(Level.SEVERE, "Error occurred while saving user", e);
                    error(new ParamResourceModel("saveError", getPage(), e.getMessage()));
                }
View Full Code Here

Examples of org.geoserver.security.impl.DataAccessRuleDAO.storeRules()

    public void testGetNoAuthChallenge() throws Exception {
        DataAccessRuleDAO dao = GeoServerExtensions.bean(DataAccessRuleDAO.class, applicationContext);
        dao.setCatalogMode(CatalogMode.CHALLENGE);

        //this test seems to fail on the build server without storing the rules...
        dao.storeRules();

        MockHttpServletResponse resp = getAsServletResponse("wfs?request=GetFeature&version=1.0.0&service=wfs&typeName=" + getLayerId(SystemTestData.BUILDINGS));
        assertEquals(401, resp.getErrorCode());
        assertEquals("Basic realm=\"GeoServer Realm\"", resp.getHeader("WWW-Authenticate"));
    }
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.