Package org.geoserver.security

Examples of org.geoserver.security.ServiceAccessRule


    }
   
    public void testRemoveDataAccessRule() {
        Set<String> roles = new HashSet<String>();
        roles.add("*");
        setupPanel(new ServiceAccessRule("*","*",roles));
       
        // print(tester.getLastRenderedPage(), true, true);
       
        tester.assertRenderedPage(FormTestPage.class);
        tester.assertNoErrorMessage();
View Full Code Here


    @Override
    protected void setUpInternal() throws Exception {
        dao = ServiceAccessRuleDAO.get();
        dao.getRules();
        rule = new ServiceAccessRule("wms", "GetMap", "ROLE_ADMINISTRATOR");
        dao.addRule(rule);
        login();
        tester.startPage(ServiceAccessRulePage.class);
    }
View Full Code Here

*/
@SuppressWarnings("serial")
public class NewServiceAccessRulePage extends AbstractServiceAccessRulePage {

  public NewServiceAccessRulePage() {
    super(new ServiceAccessRule());
    form.add(new DuplicateRuleValidator());
  }
View Full Code Here

  @Override
  protected void onFormSubmit() {
    try {
      String roles = parseRole(rolesForComponent.getRolePalette()
          .getModelObjectAsString());
      ServiceAccessRule rule = new ServiceAccessRule((String) service
          .getConvertedInput(), (String) method
          .getConvertedInput(), roles);
      ServiceAccessRuleDAO dao = ServiceAccessRuleDAO.get();
      dao.addRule(rule);
      dao.storeRules();
View Full Code Here

   * @author aaime
   *
   */
  class DuplicateRuleValidator extends AbstractFormValidator {
    public void validate(Form form) {
      ServiceAccessRule rule = new ServiceAccessRule((String) service
          .getConvertedInput(), (String) method
          .getConvertedInput(), rolesForComponent.getRolePalette()
          .getModelObjectAsString());
      if (ServiceAccessRuleDAO.get().getRules().contains(rule)) {
        form.error(new ParamResourceModel("duplicateRule", getPage(),
            rule.getKey()).getString());
      }
    }
View Full Code Here

    RolesFormComponent rolesForComponent;

    Form form;

    public AbstractServiceAccessRulePage(ServiceAccessRule rule) {
        setModel(new CompoundPropertyModel(new ServiceAccessRule(rule)));

        // build the form
        form = new Form("ruleForm");
        add(form);
        form.add(service = new DropDownChoice("service", getServiceNames()));
View Full Code Here

TOP

Related Classes of org.geoserver.security.ServiceAccessRule

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.