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);
}
}