Package v7db.files

Examples of v7db.files.AuthorisationProvider


  }

  public void testAnonymousCannotDoAnythingByDefault() {
    Properties props = new Properties();
    props.setProperty("acl.provider", aclProvider);
    AuthorisationProvider auth = AuthorisationProviderFactory
        .getAuthorisationProvider(props);

    V7File dummyFile = new V7File(null, new BasicDBObject(), null);

    assertFalse(auth.authoriseOpen(dummyFile, null));
    assertFalse(auth
        .authoriseOpen(dummyFile, AuthenticationToken.ANONYMOUS));
    assertFalse(auth.authoriseRead(dummyFile, null));
    assertFalse(auth
        .authoriseRead(dummyFile, AuthenticationToken.ANONYMOUS));
    assertFalse(auth.authoriseWrite(dummyFile, null));
    assertFalse(auth.authoriseWrite(dummyFile,
        AuthenticationToken.ANONYMOUS));

  }
View Full Code Here

TOP

Related Classes of v7db.files.AuthorisationProvider

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.