Package org.apache.wicket.security.checks

Examples of org.apache.wicket.security.checks.ComponentSecurityCheck


  private static final long serialVersionUID = 1L;

  public SecureTestPage()
  {
    super();
    setSecurityCheck(new ComponentSecurityCheck(this));
  }
View Full Code Here


   * @param model
   */
  public SecureTestPage(IModel< ? > model)
  {
    super(model);
    setSecurityCheck(new ComponentSecurityCheck(this));
  }
View Full Code Here

   * @param parameters
   */
  public SecureTestPage(PageParameters parameters)
  {
    super(parameters);
    setSecurityCheck(new ComponentSecurityCheck(this));
  }
View Full Code Here

  {
    add(new Label("welcome", "Welcome Only logged in users can see this page"));
    TextField<String> textField = new TextField<String>("secure", new Model<String>(
        "secure textfield"));
    add(SecureComponentHelper
        .setSecurityCheck(textField, new ComponentSecurityCheck(textField)));
  }
View Full Code Here

   */
  public SecureComponentPage()
  {
    add(new Label("welcome", "Welcome Anyone can see this page as long as they are logged in"));
    Label secureLabel = new Label("secure", "this label is what forces you to login");
    add(SecureComponentHelper.setSecurityCheck(secureLabel, new ComponentSecurityCheck(
      secureLabel)));

    add(new WebMarkupContainer("replaceMe")); // content is irrelevant in
    // this example so i will
    // just use 2 containers
View Full Code Here

  public void testSecureComponentHelper()
  {
    TextField<String> field = new TextField<String>("id");
    assertNull(SecureComponentHelper.getSecurityCheck(field));
    assertTrue(SecureComponentHelper.isActionAuthorized(field, "whatever"));
    ComponentSecurityCheck check = new ComponentSecurityCheck(field);
    // this did not register the check with the component
    assertNull(SecureComponentHelper.getSecurityCheck(field));
    SecureComponentHelper.setSecurityCheck(field, check);
    assertEquals(check, SecureComponentHelper.getSecurityCheck(field));
    try
View Full Code Here

TOP

Related Classes of org.apache.wicket.security.checks.ComponentSecurityCheck

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.