Examples of allows()


Examples of org.apache.jackrabbit.api.security.user.Impersonation.allows()

        // modify impersonation of another user
        u = (User) umgr.getAuthorizable(uID);
        Impersonation uImpl = u.getImpersonation();

        if (!uImpl.allows(buildSubject(otherP))) {
            // ... trying to modify 'impersonators of another user must succeed
            assertTrue(uImpl.grantImpersonation(otherP));
            save(otherSession);

            assertTrue(uImpl.allows(buildSubject(otherP)));
View Full Code Here

Examples of org.apache.jackrabbit.api.security.user.Impersonation.allows()

        if (!uImpl.allows(buildSubject(otherP))) {
            // ... trying to modify 'impersonators of another user must succeed
            assertTrue(uImpl.grantImpersonation(otherP));
            save(otherSession);

            assertTrue(uImpl.allows(buildSubject(otherP)));

            uImpl.revokeImpersonation(otherP);
            save(otherSession);
        } else {
            throw new NotExecutableException("Cannot execute test. OtherP can already impersonate UID-user.");
View Full Code Here

Examples of org.apache.wookie.proxy.Policy.allows()

  }
  @Test
  public void checkInvalid() throws URISyntaxException{
    Policy policy = new Policy();
    assertEquals(0,policy.allows(new URI("http://test.apache.org")))
  }

  @Test
  public void checkInvalid2() throws URISyntaxException, PolicyFormatException{
    Policy policy = new Policy("* http://test.apache.org ALLOW");
View Full Code Here

Examples of org.archive.modules.net.RobotsPolicy.allows()

        }
        // test against robots.txt if available
        if (cs.isValidRobots()) {
            String ua = metadata.getUserAgent();
            RobotsPolicy robots = metadata.getRobotsPolicy();
            if(!robots.allows(ua, curi, cs.getRobotstxt())) {
                if(getCalculateRobotsOnly()) {
                    // annotate URI as excluded, but continue to process normally
                    curi.getAnnotations().add("robotExcluded");
                    return false;
                }
View Full Code Here

Examples of org.opentripplanner.routing.edgetype.StreetTraversalPermission.allows()

            edgeEndpoints.add(endpoints);
           
            StreetTraversalPermission perm = se.getPermission();
           
            // CAR and CUSTOM_MOTOR_VEHICLE should always have the same permissions.
            assertEquals(perm.allows(StreetTraversalPermission.CAR),
                    perm.allows(StreetTraversalPermission.CUSTOM_MOTOR_VEHICLE));

            // Check turn restriction consistency.
            // NOTE(flamholz): currently there don't appear to be any turn restrictions
            // in the OSM file we are loading.
View Full Code Here

Examples of org.teiid.adminapi.impl.DataPolicyMetadata.allows()

        break;
      }
     
      Iterator<String> i = results.iterator();
      while (i.hasNext()) {       
        if (policy.allows(i.next(), action)) {
          i.remove();
        }
      }
    }
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.