Package com.getperka.flatpack.security

Examples of com.getperka.flatpack.security.Security


    checkMayNot(p, personProps.get("boss"), ALL_OPS);
  }

  private void check(MyPrincipal principal, Person p, Property property, boolean expect,
      CrudOperation... ops) {
    Security security = securities.get();
    for (CrudOperation op : ops) {
      boolean may;
      if (property == null) {
        may = security.may(principal, SecurityTarget.of(p), SecurityAction.of(op));
      } else {
        may = security.may(principal, SecurityTarget.of(p, property), SecurityAction.of(op));
      }
      assertEquals(p.getUuid() + (expect ? " could not " : " should not ") + op, expect, may);
    }
  }
View Full Code Here

TOP

Related Classes of com.getperka.flatpack.security.Security

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.