Examples of implies()


Examples of org.apache.openejb.server.auth.IPAddressPermission.implies()

        }
    }

    public void testExactIPAddressPermission() throws Exception {
        IPAddressPermission permission = IPAddressPermissionFactory.getIPAddressMask("121.122.123.124");
        assertTrue(permission.implies(InetAddress.getByAddress(new byte[]{121, 122, 123, 124})));
        assertFalse(permission.implies(InetAddress.getByAddress(new byte[]{121, 122, 123, 125})));
    }

    public void testWrongStartWithIPAddressPermission1() throws Exception {
        try {
View Full Code Here

Examples of org.apache.sentry.policy.common.Privilege.implies()

    Privilege collection1Case = create(new KeyValue("colleCtIon", "coLl1"));

    assertTrue(collection1.implies(collection1));
    assertTrue(collection2.implies(collection2));
    assertTrue(collection1.implies(collection1Case));
    assertTrue(collection1Case.implies(collection1));

    assertFalse(collection1.implies(collection2));
    assertFalse(collection1Case.implies(collection2));
    assertFalse(collection2.implies(collection1));
    assertFalse(collection2.implies(collection1Case));
View Full Code Here

Examples of org.apache.shiro.authz.Permission.implies()

    Permission collection1Case = create(new KeyValue("colleCtIon", "coLl1"));

    assertTrue(collection1.implies(collection1));
    assertTrue(collection2.implies(collection2));
    assertTrue(collection1.implies(collection1Case));
    assertTrue(collection1Case.implies(collection1));

    assertFalse(collection1.implies(collection2));
    assertFalse(collection1Case.implies(collection2));
    assertFalse(collection2.implies(collection1));
    assertFalse(collection2.implies(collection1Case));
View Full Code Here

Examples of org.apache.shiro.authz.permission.WildcardPermission.implies()

            return true;
        }
        for(String permission : permissions) {
            WildcardPermission p1 = new WildcardPermission(permission);
            WildcardPermission p2 = new WildcardPermission(resource.getPermission());
            if(p1.implies(p2) || p2.implies(p1)) {
                return true;
            }
        }
        return false;
    }
View Full Code Here

Examples of org.apache.wicket.security.actions.WaspAction.implies()

  public void testImpliesWaspAction()
  {
    ActionFactory factory = Actions.getActionFactory(KEY);
    WaspAction action = factory.getAction(Render.class);
    WaspAction action2 = action.add(factory.getAction(Inherit.class));
    assertTrue(action2.implies(action));
    assertFalse(action.implies(action2));
  }

  /**
   *
 
View Full Code Here

Examples of org.apache.wicket.security.hive.authorization.Permission.implies()

    // permission has no exact match, perform an implies check
    Iterator<Permission> it = principals.leftIterator();
    while (it.hasNext())
    {
      Permission possibleMatch = it.next();
      if (!possibleMatch.implies(permission))
        continue;
      if (hasPrincipal(subject, principals.getRight(possibleMatch)))
      {
        if (log.isDebugEnabled())
          log.debug(subject + " implies " + permission);
View Full Code Here

Examples of org.jboss.naming.JndiPermission.implies()

  
   public void testImpliesSimplePath() throws Exception
   {
      JndiPermission test1 = new JndiPermission("simple", JndiPermission.ALL_ACTION);
      JndiPermission test2 = new JndiPermission("simple", JndiPermission.ALL_ACTION);
      assertTrue(test2.implies(test1));

      test2 = new JndiPermission("notsimple", JndiPermission.ALL_ACTION);
      assertFalse(test2.implies(test1));

      test2 = new JndiPermission(ALL_BINDINGS, JndiPermission.ALL_ACTION);
View Full Code Here

Examples of org.osgi.service.event.TopicPermission.implies()

        TopicPermission actualPermission
          = new TopicPermission("com/acme/*","subscribe");

        assertTrue(getName() +"Should not recevice this topic:"
                   +(String)event.getProperty(EventConstants.EVENT_TOPIC),
                   actualPermission.implies(permissionAquired));

        Object message;
        /* try to get the message */
        message = event.getProperty("Synchronus message");
        /* check if message is null */
 
View Full Code Here

Examples of org.osgi.service.event.TopicPermission.implies()

        /* make a topic permission from the received topic in order to check it*/
        TopicPermission permissionAccuired = new TopicPermission(eventTopic, "SUBSCRIBE");
        /* make a topic permission from the topic to consume in order to check it*/
        TopicPermission actualPermission = new TopicPermission(topicsToConsume[0], "SUBSCRIBE");
        /* assert if the topic in the event is the same as the topic to listen fore including wildcard */
        assertTrue("The topics was not equal", actualPermission.implies(permissionAccuired));

        Object message;
        /* try to get the message */
        message = event.getProperty("Synchronus message");

View Full Code Here

Examples of org.wicketstuff.security.actions.WaspAction.implies()

  private boolean isAuthorized(String alias, WaspAction action)
  {
    WaspAction authorizedAction = authorized.get(alias);
    if (authorizedAction == null)
      return false;
    return authorizedAction.implies(action);
  }

  /**
   *
   * @see org.wicketstuff.security.strategies.WaspAuthorizationStrategy#isComponentAuthenticated(org.apache.wicket.Component)
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.