Package gabriel.acl

Examples of gabriel.acl.AclEntry


  }

  public void testNegativePermsissionCancelsPermission() {
    Permission permission = new Permission("TestPermission");
    Principal principal = new Principal("TestPrincipal");
    AclEntry entry = new AclEntry(principal);
    entry.addPermission(permission);
    acl.addEntry(owner, entry);

    AclEntry negativeEntry = new AclEntry(principal);
    negativeEntry.addPermission(permission);
    negativeEntry.setNegativePermissions();
    acl.addEntry(owner, negativeEntry);

    Principal checkPrincipal = new Principal("TestPrincipal");
    Permission checkPermission = new Permission("TestPermission");
    assertEquals("Principal does not have permission because of negative entry", -1, acl.checkPermission(checkPrincipal, checkPermission));
View Full Code Here

TOP

Related Classes of gabriel.acl.AclEntry

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.