Package org.apache.wicket.security.hive.authorization.permissions

Examples of org.apache.wicket.security.hive.authorization.permissions.ComponentPermission


        hive = new SimpleCachingHive();
      else
        hive = new BasicHive();
      Principal principal = new SimplePrincipal("speed");
      SwarmAction action = (SwarmAction) actionFactory.getAction("access, render");
      hive.addPermission(principal, new ComponentPermission(
        "org.apache.wicket.security.pages.SpeedPage", action));
      for (int i = 0; i < ROWS; i++)
      {
        for (int j = 0; j < COLS / denialFactor; j++)
        {
          // not granting a permission for each component will add
          // linear time to check, the more permissions the more time
          // will be added
          hive.addPermission(principal, new ComponentPermission(
            "org.apache.wicket.security.pages.SpeedPage:rows:" + i + ":cols:" + j
              + ":label", action));
        }
      }
      return hive;
View Full Code Here


   *      org.apache.wicket.security.actions.WaspAction)
   */
  @Override
  public boolean isClassAuthorized(Class< ? > clazz, WaspAction action)
  {
    if (hasPermission(new ComponentPermission(SecureComponentHelper.alias(clazz), action)))
      return true;
    logMessage(getMessageSource());
    return false;
  }
View Full Code Here

   *      org.apache.wicket.security.actions.WaspAction)
   */
  @Override
  public boolean isComponentAuthorized(Component component, WaspAction action)
  {
    if (hasPermission(new ComponentPermission(component, action)))
      return true;
    IAuthorizationMessageSource message = getMessageSource();
    if (message != null)
    {
      message.setComponent(component);
View Full Code Here

TOP

Related Classes of org.apache.wicket.security.hive.authorization.permissions.ComponentPermission

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.